|
|
A082460
|
|
a(n) = pi(n) - a(n - 1) where pi(n) = A000720(n).
|
|
2
|
|
|
0, 1, 1, 1, 2, 1, 3, 1, 3, 1, 4, 1, 5, 1, 5, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
with(numtheory): a:=proc(n) if n=1 then 0 elif (n mod 2)= 0 then 1 else pi(n)-1; fi: end proc: seq(a(n), n=1..100); # Ridouane Oudra, May 27 2023
|
|
MATHEMATICA
|
f[x_] := PrimePi[x]-f[x-1] f[0]=0; Table[f[w], {w, 1, 128}]
nxt[{n_, a_}]:={n+1, PrimePi[n+1]-a}; NestList[nxt, {1, 0}, 100][[All, 2]] (* Harvey P. Dale, Jul 19 2021 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|