|
|
A215530
|
|
The limit of the string "0, 1" under the operation 'repeat string twice and append 0'.
|
|
3
|
|
|
0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0
|
|
COMMENTS
|
Start of the first occurrence of k consecutive zeros: A123720 except the first term.
The limit of the string "0, 1" under the operation 'repeat string twice and append 1': 0 followed by b(n)=1-a(n+1).
Sum of the first 10^n terms c(n) begins: 0, 4, 34, 335, 3335, 33336, 333336, 3333338, 33333338, 333333339, 3333333339.
|
|
LINKS
|
|
|
EXAMPLE
|
01 -> 01010 -> 01010010100 -> 01010010100010100101000 etc.
|
|
MATHEMATICA
|
rst[ll_] := Flatten[ll /. {x__ -> {x, x, 0}}]; Nest[rst[#] &, {0, 1}, 5] (* Harvey P. Dale, May 25 2015 *)
|
|
PROG
|
(Python)
TOP = 10000
a = [0]*TOP
b = [0]*TOP
a[1] = b[1] = 1
n = 2
while n*2+1<TOP:
a[n:] = a[:n]
a.append(0)
b[n:] = b[:n]
b.append(1)
n += n+1
for i in range(n-1):
print a[i],
if b[i]!= 1 - a[i+1]:
print 'error!'
break
(Perl)
my $A = "01";
for (my $j = 1; $j < 10; $j++) { $A .= $A . "0"; } print join(', ', split(//, $A)) . "\n";
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|