OFFSET
1,5
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
FORMULA
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Dec 23 2002
STATUS
approved