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.
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10011
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