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!)
A236677 a(0)=1; for n>0, a(n) = (1-a(floor(log_2(n)))) * a(n-msb(n)); characteristic function of A079599. 3
1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0
COMMENTS
This is NOT the leftmost column of A125999, as here a(2^64) = 0, while X_A126002(2^64) = 1.
LINKS
FORMULA
a(0) = 1 and for n > 0, a(n) = (1-a(A000523(n))) * a(A053645(n)) [where A000523 gives the bit-index of the most significant bit of n (msb), and A053645 gives n without its msb].
For all n, a(n) * A034798(n) = 0 (as ones in this sequence occur at the positions where zeros are in A034798).
PROG
(Scheme, with Antti Karttunen's IntSeq-library for memoizing definec-macro, two alternative implementations)
(definec (A236677 n) (if (zero? n) 1 (* (- 1 (A236677 (A000523 n))) (A236677 (A053645 n)))))
(definec (A236677 n) (let loop ((n n) (i 0)) (cond ((zero? n) 1) ((odd? n) (if (= 1 (A236677 i)) 0 (loop (/ (- n 1) 2) (+ i 1)))) (else (loop (/ n 2) (+ i 1))))))
CROSSREFS
A236678 gives the partial sums. Differs from the characteristic function of A047467 for the first at n=256, as here a(256)=0, while X_A047467(256)=1 because 256 = 0 modulo 8.
Sequence in context: A154271 A225569 A087032 * A190236 A190224 A352678
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 29 2014
EXTENSIONS
Incorrect formula removed by Georg Fischer, Dec 02 2022
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 April 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)