The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115971 a(0) = 0. If a(n) = 0, then a(2^n) through a(2^(n+1)-1) are each equal to 1. If a(n) = 1, then a(m + 2^n) = a(m) for each m, 0 <= m <= 2^n -1. 2
0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Not the characteristic function of A047564, as it does not contain 256, although here a(256) = 1. - Antti Karttunen, Oct 18 2018
LINKS
FORMULA
a(0) = 0; and for n > 0, if a(A000523(n)) is 0, then a(n) = 1, otherwise a(n) = a(n-(2^A000523(n))) = a(A053645(n)). - Antti Karttunen, Oct 22 2018
EXAMPLE
a(2) = 0. So terms a(4) through a(7) are each equal to 1.
a(3) = 1, so terms a(8) through a(15) are the same as terms a(0) through a(7).
From Antti Karttunen, Oct 22 2018: (Start)
For n = 256 = 2^8, a(8) = 0, thus a(256) = 1.
For n = 2^64, a(64) = 0, thus a(2^64) = 1. (End)
PROG
(PARI)
A000523(n) = if(n<1, 0, #binary(n)-1);
A115971(n) = if(!n, n, if(!A115971(A000523(n)), 1, A115971(n-(2^A000523(n))))); \\ Antti Karttunen, Oct 18 2018
CROSSREFS
Different from A320007.
Sequence in context: A112690 A316343 A288864 * A320007 A072165 A358224
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Mar 14 2006
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 13:23 EDT 2024. Contains 372540 sequences. (Running on oeis4.)