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!)
 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

%I

%S 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,

%T 16,18,18,32,33,32,33,36,36,36,37,32,32,34,34,32,33,32,32,32,33,34,35,

%U 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

%N 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.

%C 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].

%H Antti Karttunen, <a href="/A292597/b292597.txt">Table of n, a(n) for n = 1..16384</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(1) = 1; for n > 1, a(n) = (A000035(n)*(1-A010051(n))) + 2*a(floor(n/2)).

%F For all n >= 1, a(n) + A292596(n) = n.

%o (Scheme, with memoization-macro definec)

%o (definec (A292597 n) (if (= 1 n) 1 (+ (* (A000035 n) (- 1 (A010051 n))) (* 2 (A292597 (floor->exact (/ n 2)))))))

%Y Cf. A000035, A010051, A014076, A071904, A292596, A292598.

%K nonn

%O 1,2

%A _Antti Karttunen_, Sep 27 2017

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 February 24 22:04 EST 2020. Contains 332216 sequences. (Running on oeis4.)