login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A218543 Number of times when an odd number is encountered, when going from 2^(n+1)-1 to (2^n)-1 using the iterative process described in A071542. 11

%I #27 Jun 05 2013 11:25:01

%S 0,1,1,2,3,6,9,18,31,54,93,167,306,574,1088,2081,3998,7696,14792,

%T 28335,54049,102742,194948,369955,703335,1340834,2563781,4915378,

%U 9444799,18180238,35047841,67660623,130806130,253252243,491034479,953404380,1853513715,3607440034

%N Number of times when an odd number is encountered, when going from 2^(n+1)-1 to (2^n)-1 using the iterative process described in A071542.

%C Ratio a(n)/A213709(n) develops as: 0, 1, 0.5, 0.666..., 0.6, 0.666..., 0.529..., 0.6, 0.574..., 0.551..., 0.520..., 0.506..., 0.498..., 0.499..., 0.503..., 0.511..., 0.521..., 0.531..., 0.539..., 0.545..., 0.547..., 0.546..., 0.542..., 0.536..., 0.531..., 0.525..., 0.520..., 0.516..., 0.512..., 0.508..., 0.504..., 0.501..., 0.498..., 0.497..., 0.495..., 0.495..., 0.495..., 0.495..., 0.495..., 0.496..., 0.496..., 0.497..., 0.497..., 0.498..., 0.498..., 0.498..., 0.497..., 0.497...

%C Ratio a(n)/A218542(n) develops as follows from n>=2 onward:

%C 1, 2, 1.5, 2, 1.125, 1.5, 1.348..., 1.227..., 1.081..., 1.025..., 0.994..., 0.997..., 1.013..., 1.045..., 1.086..., 1.132..., 1.172..., 1.198..., 1.208..., 1.201..., 1.182..., 1.157..., 1.131..., 1.107..., 1.085..., 1.065..., 1.047..., 1.031..., 1.016..., 1.004..., 0.994..., 0.986..., 0.981..., 0.979..., 0.978..., 0.979..., 0.981..., 0.983..., 0.986..., 0.988..., 0.989..., 0.990..., 0.991..., 0.991..., 0.989..., 0.987...

%C Observation: A179016 seems to alternatively slightly favor the odd numbers and then again the even numbers, at least for the terms computed so far.

%C Please plot this sequence against A218542 in the "ratio mode" (given as a link) to see how smoothly (almost "continuously") the ratios given above develop.

%C What is the reason for that smoothness? (Conjecture: The distribution of "tendrils", i.e. finite subtrees in the beanstalk and its almost fractal nature? Cf: A218787.)

%H Antti Karttunen, <a href="/A218543/b218543.txt">Table of n, a(n) for n = 0..47</a>

%H OEIS Server, <a href="https://oeis.org/plot2a?name1=A218543&amp;name2=A218542&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=0&amp;radiop1=ratio&amp;drawpoints=true">Sequence plotted together with A218542 showing how their ratio develops.</a>

%F a(n) = Sum_{i=A218600(n) .. (A218600(n+1)-1)} A213729(i)

%e (2^0)-1 (0) is reached from (2^1)-1 (1) with one step by subtracting A000120(1) from 1. Zero is not an odd number, so a(0)=0.

%e (2^1)-1 (1) is reached from (2^2)-1 (3) with one step by subtracting A000120(3) from 3. One is an odd number, so a(1)=1.

%e (2^2)-1 (3) is reached from (2^3)-1 (7) with two steps by first subtracting A000120(7) from 7 -> 4, and then subtracting A000120(4) from 4 -> 3. Four is not an odd number, but three is, so a(2)=1.

%o (Scheme with memoizing definec-macro): (definec (A218543 n) (if (zero? n) 0 (let loop ((i (- (expt 2 (1+ n)) n 2)) (s 0)) (cond ((pow2? (1+ i)) (+ s (modulo i 2))) (else (loop (- i (A000120 i)) (+ s (modulo i 2))))))))

%o (define (pow2? n) (and (> n 0) (zero? (A004198bi n (- n 1))))) ;; A004198 is bitwise AND

%o ;; Or with a summing-function add:

%o (define (A218543v2 n) (add A213729 (A218600 n) (-1+ (A218600 (1+ n)))))

%o (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))

%Y a(n) = A213709(n)-A218542(n). Cf. A213733, A218787, A218789.

%Y Analogous sequence for factorial number system: A219663.

%K nonn

%O 0,4

%A _Antti Karttunen_, Nov 02 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 06:12 EDT 2024. Contains 371769 sequences. (Running on oeis4.)