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!)
 A078349 Number of primes in sequence h(m) defined by h(1) = n, h(m+1) = Floor(h(m)/2). 6
 0, 1, 1, 1, 2, 1, 2, 1, 1, 2, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 3, 4, 1, 1, 2, 2, 2, 3, 2, 3, 1, 1, 2, 2, 1, 2, 2, 2, 2, 3, 2, 3, 3, 3, 4, 5, 1, 1, 1, 1, 2, 3, 2, 2, 2, 2, 3, 4, 2, 3, 3, 3, 1, 1, 1, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 4, 2, 2, 3, 3, 3, 4, 3, 3, 4, 4, 5, 5, 1, 2, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 LINKS Antti Karttunen, Table of n, a(n) for n = 1..16384 FORMULA From Antti Karttunen, Oct 01 2017: (Start) a(1) = 0; for n > 1, a(n) = A010051(n) + a(floor(n/2)). a(n) = A000120(A292599(n)). a(n) = A007814(A292258(n)). a(n) >= A292598(n). a(n) >= A292936(n). (End) EXAMPLE The sequence h(m) for n = 5 is 5, 2, 1, 0, 0, 0, ...., in which two terms are primes. Therefore a(5) = 2. MATHEMATICA f[n_] := Module[{i, p}, i = n; p = 0; While[i > 1, If[PrimeQ[i], p = p + 1]; i = Floor[i/2]]; p]; Table[f[i], {i, 1, 100}] PROG (MIT/GNU Scheme, with memoization-macro definec) (definec (A078349 n) (if (<= n 1) 0 (+ (A010051 n) (A078349 (floor->exact (/ n 2)))))) ;; Antti Karttunen, Oct 01 2017 (PARI) A078349(n) = if(1==n, 0, isprime(n)+A078349(n\2)); \\ Antti Karttunen, Oct 01 2017 CROSSREFS Cf. A010051, A292258, A292259, A292598, A292599, A292936. Sequence in context: A332997 A298614 A108129 * A266476 A081327 A205781 Adjacent sequences:  A078346 A078347 A078348 * A078350 A078351 A078352 KEYWORD nonn,changed AUTHOR Joseph L. Pe, Dec 23 2002 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.

Last modified April 5 03:58 EDT 2020. Contains 333238 sequences. (Running on oeis4.)