login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A215532
The limit of the string "0, 1" under the operation 'append first k terms, increment k' with k=2 initially.
5
0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0
OFFSET
0
COMMENTS
An infinite binary word.
Sum of the first 10^n terms b(n) begins: 0, 4, 43, 440, 4344, 43826, 439780, 4344256, 43430906, 435183414, 4378550493.
EXAMPLE
01 -> 0101 -> 0101 010 -> 0101010 0101 -> 01010100101 01010 etc.
MATHEMATICA
Module[{k = 1}, Nest[Join[#, #[[;; ++k]]] &, {0, 1}, 15]] (* Paolo Xausa, Nov 23 2024 *)
PROG
(Python)
TOP = 1000
a = [0]*TOP
a[1] = 1
n = k = 2
while n+k < TOP:
a[n:] = a[:k]
n += k
k += 1
for k in range(n):
print(a[k], end=', ')
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Aug 15 2012
STATUS
approved