|
|
A242018
|
|
Starting with a(0) = 0, a(1) = 0, a(2) = 1, repeatedly append to this sequence the last half of the currently-existing terms, taking the longer half if there are an odd number of terms.
|
|
2
|
|
|
0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0
|
|
COMMENTS
|
The length of this sequence after n iterations of appending its last half to itself is given by A061419(n+3).
The proportion of terms that are 1 in this sequence appears to be about 0.7017...
The first occurrence of n consecutive 1s occur at indices 2, 4, 7, 26, 27308, ... (A242020). It is unknown whether or not this sequence contains arbitrarily-long runs of consecutive 1s.
|
|
LINKS
|
|
|
EXAMPLE
|
The sequence starts "0, 0, 1".
We then add "0, 1" to the end of the sequence, giving "0, 0, 1, 0, 1".
We then add "1, 0, 1" to the end of the sequence, giving "0, 0, 1, 0, 1, 1, 0, 1".
We then add "1, 1, 0, 1" to the end of the sequence, giving "0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1".
The present sequence is obtained by iterating this procedure indefinitely, always appending the last half of the sequence to itself.
|
|
MATHEMATICA
|
NestList[StringJoin[#, StringDrop[#, Floor[StringLength[#]/2]]]&, "001", 15] (* Peter J. C. Moses, Jul 23 2021 *)
|
|
PROG
|
(PARI) lista(nn) = {vra = [0, 0, 1]; for (i=1, 3, print1(vra[i], ", "); ); for (i=1, nn, ia = #vra\2+1; ib = #vra; for (j=ia, ib, print1(vra[j], ", "); vra = concat(vra, vra[j]); ); ); } \\ Michel Marcus, Aug 12 2014
(Python)
for n in range(1, 20):
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|