OFFSET
1,3
COMMENTS
Conjecture: lim_{n->infinity} a(n)/2^n > 0; appears to be about 0.1432645404.
FORMULA
a(1) = a(2) = 1, for p an odd prime, a(p) = 2a(p-1), otherwise a(n) = 2a(n-1) - a(n - pi(n) - 1).
MAPLE
a:= proc(n) option remember; `if`(n=1, 1,
add(a(n-k), k=1..numtheory[pi](n)))
end:
seq(a(n), n=1..36); # Alois P. Heinz, Nov 21 2024
MATHEMATICA
a[1]=a[2]=1; a[n_]:=If[PrimeQ[n]&&OddQ[n], 2a[n-1], 2a[n-1]-a[n-PrimePi[n]-1]]; Table[a[n], {n, 34}] (* James C. McMahon, Nov 21 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Oct 11 2006
STATUS
approved