The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A334820 Sequence is limit_{t->oo} s_t, where s_k = s_{k-1},s_{k-1}[k-1..end] starting with s_0 = s_0[0..1] = 0,1. 2
 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS A nonperiodic sequence of 0 and 1. LINKS Kevin Ryde, PARI/GP code and explanation. MAPLE s:= proc(n) option remember; `if`(n=0, [0, 1][],       (l-> [l[], l[n..-1][]][])([s(n-1)]))     end: s(10);  # gives 1035 = A005126(10) terms;  # Alois P. Heinz, May 12 2020 MATHEMATICA a[n_] := If[n<2, n, Module[{k = Floor@Log[2, n], m = n}, m-=k+1; While[k >= 0, If[BitGet[m, k]==0, m++; If[BitGet[m, k]==1, Return[1]]]; k--]]; 0]; a /@ Range[0, 104] (* Jean-François Alcover, Nov 16 2020, after Kevin Ryde *) PROG (PARI) a(n) = { if(n, my(k=logint(n, 2)); n-=k+1; while(k>=0, if(!bittest(n, k), n++; if(bittest(n, k), return(1))); k--)); 0; }  \\ Kevin Ryde, Jun 26 2020 CROSSREFS Cf. A005126 (s lengths), A057215. Sequence in context: A284533 A286665 A096270 * A308185 A159689 A174282 Adjacent sequences:  A334817 A334818 A334819 * A334821 A334822 A334823 KEYWORD nonn AUTHOR Richard Aime Blavy, May 12 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 18 11:20 EDT 2021. Contains 347518 sequences. (Running on oeis4.)