|
|
A082926
|
|
Difference between the number of primes equal to or less than n and (1 + the number of nonsquarefree numbers equal to or less than n).
|
|
2
|
|
|
1, 0, 1, 0, 1, 1, 2, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 2, 3, 2, 2, 1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 1, 2, 3, 3, 2, 3, 4, 5, 5, 6, 5, 6, 6, 7, 7, 7, 6, 7, 6, 6, 7, 8, 8, 8, 7, 8, 8, 8, 7, 8, 7, 7, 8, 9, 9, 9, 8, 9, 10, 10, 9, 10, 10, 10, 10, 11, 10, 11, 11, 12, 12, 12, 12, 13, 12
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,7
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
nsfQ[n_] := n == 1 || ! SquareFreeQ[n]; Abs[Accumulate[Table[If[nsfQ[n], 1, 0] - If[PrimeQ[n], 1, 0], {n, 1, 100}]]] (* Amiram Eldar, Jun 13 2022 *)
|
|
PROG
|
(PARI) a(n) = abs(sum(k=1, n, !issquarefree(k)) + 1 - primepi(n)); \\ Michel Marcus, Mar 27 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Anonymous, Apr 15 2003
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|