Monday 26 September 2016

Engel Expansions

I've encountered Engel expansions before and today I was reminded of them again when my day count number, 24648, featured in OEIS A068379 as the Engel expansion of sinh(1/2). The initial sequence of numbers is:
1, 24, 80, 168, 288, 440, 624, 840, 1088, 1368, 1680, 2024, 2400, 2808, 3248, 3720, 4224, 4760, 5328, 5928, 6560, 7224, 7920, 8648, 9408, 10200, 11024, 11880, 12768, 13688, 14640, 15624, 16640, 17688, 18768, 19880, 21024, 22200, 23408, 24648, 25920, 27224
An Engel expansion is explained by Wikipedia as:

The algorithm for calculating the terms in an Engels expansion is as follows:



This is straightforward enough and I set up a worksheet in Excel to calculate the terms of the Engel expansion for whatever number I entered. I tested it out and all seemed well until I looked more closely at the terms I got for sinh(1/2). Here they are as reported by the worksheet:


The first six terms match the OEIS listing but the seventh diverges by one (623 as opposed to 624) and after that things rapidly fall apart as can be seen by comparing terms. I guess the slight errors that arise as the increasingly smaller u-th terms are divided into one quickly compound and spell disaster. Interesting illustration of the limitations of spreadsheets when very small numbers are concerned.

ADDENDUM:

It's now 1st May 2019 and I've been using SageMath for quite some time now. Here is the SageMath code to generate the Engels expansion of sinh(1/2) up to 24648 (permalink to SageMathCell):

[1, 2, 24, 80, 168, 288, 440, 624, 840, 1088, 1368, 1680, 2024, 2400, 2808, 3248, 3720, 4224, 4760, 5328, 5928, 6560, 7224, 7920, 8648, 9408, 10200, 11024, 11880, 12768, 13688, 14640, 15624, 16640, 17688, 18768, 19880, 21024, 22200, 23408, 24648]

No comments:

Post a Comment