cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A218543 #27 Jun 05 2013 11:25:01
%S A218543 0,1,1,2,3,6,9,18,31,54,93,167,306,574,1088,2081,3998,7696,14792,
%T A218543 28335,54049,102742,194948,369955,703335,1340834,2563781,4915378,
%U A218543 9444799,18180238,35047841,67660623,130806130,253252243,491034479,953404380,1853513715,3607440034
%N 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.
%C A218543 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 A218543 Ratio a(n)/A218542(n) develops as follows from n>=2 onward:
%C A218543 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 A218543 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 A218543 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 A218543 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 A218543 Antti Karttunen, <a href="/A218543/b218543.txt">Table of n, a(n) for n = 0..47</a>
%H A218543 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 A218543 a(n) = Sum_{i=A218600(n) .. (A218600(n+1)-1)} A213729(i)
%e A218543 (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 A218543 (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 A218543 (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 A218543 (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 A218543 (define (pow2? n) (and (> n 0) (zero? (A004198bi n (- n 1))))) ;; A004198 is bitwise AND
%o A218543 ;; Or with a summing-function add:
%o A218543 (define (A218543v2 n) (add A213729 (A218600 n) (-1+ (A218600 (1+ n)))))
%o A218543 (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))
%Y A218543 a(n) = A213709(n)-A218542(n). Cf. A213733, A218787, A218789.
%Y A218543 Analogous sequence for factorial number system: A219663.
%K A218543 nonn
%O A218543 0,4
%A A218543 _Antti Karttunen_, Nov 02 2012