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!)
A292597 a(1) = 1; for n > 1, a(n) = c(n) + 2*a(floor(n/2)), where c(n) is the characteristic function of odd composites, A071904. 2
1, 2, 2, 4, 4, 4, 4, 8, 9, 8, 8, 8, 8, 8, 9, 16, 16, 18, 18, 16, 17, 16, 16, 16, 17, 16, 17, 16, 16, 18, 18, 32, 33, 32, 33, 36, 36, 36, 37, 32, 32, 34, 34, 32, 33, 32, 32, 32, 33, 34, 35, 32, 32, 34, 35, 32, 33, 32, 32, 36, 36, 36, 37, 64, 65, 66, 66, 64, 65, 66, 66, 72, 72, 72, 73, 72, 73, 74, 74, 64, 65, 64, 64, 68, 69, 68, 69, 64, 64, 66, 67 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
1-bits in base-2 expansion of a(n) indicate the positions of odd nonprimes in the sequence [n, floor(n/2), floor(n/4), ..., 1].
LINKS
FORMULA
a(1) = 1; for n > 1, a(n) = (A000035(n)*(1-A010051(n))) + 2*a(floor(n/2)).
For all n >= 1, a(n) + A292596(n) = n.
PROG
(Scheme, with memoization-macro definec)
(definec (A292597 n) (if (= 1 n) 1 (+ (* (A000035 n) (- 1 (A010051 n))) (* 2 (A292597 (floor->exact (/ n 2)))))))
CROSSREFS
Sequence in context: A039593 A327649 A265529 * A101656 A090557 A230875
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 27 2017
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 March 19 06:05 EDT 2024. Contains 370952 sequences. (Running on oeis4.)