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.

Showing 1-2 of 2 results.

A164363 The number of 1's in the n-th stage of A164349.

Original entry on oeis.org

1, 1, 2, 3, 6, 12, 23, 46, 91, 182, 364, 727, 1454, 2908, 5816, 11631, 23262, 46523, 93046, 186092, 372183, 744366, 1488732, 2977463, 5954926, 11909851, 23819702, 47639404, 95278807, 190557614, 381115228, 762230456, 1524460911, 3048921822, 6097843643
Offset: 1

Views

Author

Jack W Grahl, Aug 14 2009

Keywords

Comments

A164349 is generated as follows. Start with the string 01, and at each stage copy the previous string twice and remove the last symbol.
Since the number of symbols in the whole string is 2^n + 1, A164363 + A164362 = 2^n + 1.

Examples

			01 -> 010 -> 01001 -> 010010100 -> 01001010001001010 etc.
So the number of 1's in the n-th stage is the sequence 1, 1, 2, 3, 6 etc.
		

Crossrefs

Programs

  • Mathematica
    t = Nest[ Most@ Flatten@ {#, #} &, {0, 1}, 25]; Table[ Count[ Take[t, 2^n + 1], 1], {n, 0, 25}] (* Robert G. Wilson v, Aug 17 2009 *)

Formula

A recurrence is given in terms of A164364(n) = A164349(2^n):
a(n+1) = 2*a(n) - A164364(n).

Extensions

a(23)-a(26) from Robert G. Wilson v, Aug 17 2009

A164364 a(n) = A164349(2^n).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0
Offset: 0

Views

Author

Jack W Grahl, Aug 14 2009

Keywords

Comments

This is the last symbol at each stage of the method for generating A164349 using string operations.
The number of 1's in the string is given by A164363, and this number is given by the recurrence
A164363(n+1) = 2 * A164363(n) - A164364(n).
This leads to the formula A164363(n+1) = 2^n - 2^(n-1) * A164364(1) - 2^(n-2) * A164364(2) - ... - A164364(n);
for example,
A164363(5) = 16 - 8 A164364(1) - 4 A164364(2) - 2 A164364(3) - A164364(4).
This means that since the total number of symbols in the n-th string is 2**n + 1, the proportion of 0's in the first k terms of A164349, as n tends to infinity, is given by the number whose binary expansion is exactly this sequence. This number is approximately 0.6450588..

Crossrefs

Programs

  • Maple
    A053645 := proc(n) local dgs ; dgs := convert(n,base,2) ; add(op(i,dgs)*2^(i-1),i=1..nops(dgs)-1) ; end: A164349 := proc(n) option remember; if n <= 1 then n; else a := A053645(n-1) ; while a > 1 do a := A053645(a-1) ; od: a ; fi; end: A164364 := proc(n) A164349(2^n) ; end: seq(A164364(n),n=0..120) ; # R. J. Mathar, Aug 17 2009
  • Mathematica
    t = Nest[ Most@ Flatten@ {#, #} &, {0, 1}, 25]; Table[ t[[2^n + 1]], {n, 0, 25}] (* Robert G. Wilson v, Aug 17 2009 *)

Extensions

More terms from R. J. Mathar, Aug 17 2009
Incorrect comments removed by Jack W Grahl, Dec 26 2014
Showing 1-2 of 2 results.