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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A292599 a(1) = 0; for n > 1, a(n) = A010051(n) + 2*a(floor(n/2)). 4
0, 1, 1, 2, 3, 2, 3, 4, 4, 6, 7, 4, 5, 6, 6, 8, 9, 8, 9, 12, 12, 14, 15, 8, 8, 10, 10, 12, 13, 12, 13, 16, 16, 18, 18, 16, 17, 18, 18, 24, 25, 24, 25, 28, 28, 30, 31, 16, 16, 16, 16, 20, 21, 20, 20, 24, 24, 26, 27, 24, 25, 26, 26, 32, 32, 32, 33, 36, 36, 36, 37, 32, 33, 34, 34, 36, 36, 36, 37, 48, 48, 50, 51, 48, 48, 50, 50, 56, 57, 56, 56, 60, 60, 62, 62, 32 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

1-bits in base-2 expansion of a(n) indicate the positions of primes in the sequence [n, floor(n/2), floor(n/4), ..., 1].

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..16384

Index entries for sequences related to binary expansion of n

FORMULA

a(1) = 0; for n > 1, a(n) = A010051(n) + 2*a(floor(n/2)).

Other identities. For all n >= 1:

A000120(a(n)) = A078349(n).

A007814(1+a(n)) = A292936(n).

MAPLE

A292599 := proc(n)

    option remember;

    if n = 1 then

        0 ;

    else

        A010051(n) + 2*procname(floor(n/2)) ;

    end if;

end proc:

seq(A292599(n), n=1..100) ; # R. J. Mathar, Sep 28 2017

MATHEMATICA

a[1] = 0; a[n_] := a[n] = Boole[PrimeQ[n]] + 2*a[Floor[n/2]]; Array[a, 96] (* Jean-Fran├žois Alcover, Sep 29 2017 *)

PROG

(Scheme, with memoization-macro definec)

(definec (A292599 n) (if (<= n 1) 0 (+ (A010051 n) (* 2 (A292599 (floor->exact (/ n 2)))))))

CROSSREFS

Cf. A010051, A078349, A292258, A292259, A292936.

Cf. also A292596 (variant for odd primes).

Sequence in context: A224962 A173540 A070770 * A071487 A124071 A034697

Adjacent sequences:  A292596 A292597 A292598 * A292600 A292601 A292602

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 22 16:36 EST 2020. Contains 332140 sequences. (Running on oeis4.)