A096394 (Engel expansion) correct?

Joshua Zucker joshua.zucker at gmail.com
Fri Feb 29 22:08:35 CET 2008


On Fri, Feb 29, 2008 at 12:34 PM, Richard Mathar<mathar at strw.leidenuniv.nl> wrote:>>  I find disparity between my version of the Engel expansion>  of the Thue-Morse constant A014571>  0.4124540336401075977833613682584552830894783744557695575733794153487935923....>                                          ^^^^^22109... here in OEIS>  and the terms in A096394, problems starting with A096394(17). This seems to>  be associated with a difference between my Thue-Morse constant and A014571(39)>  as marked above.
I get    0.412454033640107597783361368258455283089478374455769557573379415348793592365...so I think my version agrees with yours, and it does clearly differfrom the version in OEIS.
>>  My version is>  A096394 := [3, 5, 6, 9, 12, 19, 92, 173, 242, 703, 1861, 3186, 4746, 7843,>>     26547, 180987, 383025, 561307, 2678667, 66497629, 118070060, 287778019,>>     527652876, 2387762279, 29492819981, 118172840270, 370227553800,>>     421788291545, 2734670413227, 14576946402931, 45504224299520,>>     765130000703664, 4360055342801637, 7761469079353833, 10553602369237270,>>     14572141160494786, 285986538707944624, 477546444411616374]>>  Any independent calculation ?
I get3 5 6 9 12 19 92 173 242 703 1861 3186 4746 7843 26547 180987 383025561307 2678667 66497629 118070060 287778019 527652876 238776227929492819981 118172840270 370227553800 421788291545 273467041322714576946402931 45504224299520 765130000703664 43600553428016377761469079353833 10553602369237270 14572141160494786285986538707944624 477546444411616374 58484648004496754676985645627896110724 7978412529470814851 622034751513886592512726870941086986321776 5960063470780716594666 2059876288595806021951125149802448069416033928 69430105680604569765801327139333024530675503662 4690948683256497178839131787537243522901788364947
so it looks like I agree with you.
Thanks for prompting me to finally write a program to produce Engelexpansions!  Just in case anyone is curious, I write in Scheme(specifcally PLT Scheme aka DrScheme).  See below for program.
All my calculations were done with exact fractions after firsttruncating the Thue-Morse constant at 8192 bits.  I checked that I gotthe same Engel terms with 4096 bits, so I'm convinced that they'recorrect.
--Joshua Zucker
;;generates the thue-morse constant as a list of bits(define (thue-morse n)  (if (= n 0)      (list 0)      (let ([tm (thue-morse (sub1 n))])        (append tm (map (λ (k) (- 1 k)) tm)))))
;;converts a list of bits into a fraction(define (binary->fraction lob)  (if (empty? lob)      0      (* 1/2 (+ (first lob) (binary->fraction (rest lob))))))
;;calculates the first k terms of the engel expansion of x(define (engel x k)  (if (or (= k 0) (= x 0))      empty      (let ([a (ceiling (/ 1 x))])        (cons a (engel (sub1 (* x a)) (sub1 k))))))
(engel (binary->fraction (thue-morse 13)) 50)






More information about the SeqFan mailing list