OFFSET
0,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
FORMULA
a(0) = 1, a(n) = a(n-1) + 0^(A059592(n) - 1).
a(n) = Sum_{k=0..n} mu(k^2+1)^2, where mu(n) is the Mobius function (A008683). - Wesley Ivan Hurt, Jul 15 2015
a(n) ~ c*n where c = Product_{p prime, p == 1 (mod 4)} (1 - 2/p^2) = 0.894841... (A335963). - Amiram Eldar, Feb 23 2021
MAPLE
ListTools:-PartialSums([seq(numtheory:-mobius(k^2+1)^2, k=0..100)]); # Robert Israel, Jul 15 2015
MATHEMATICA
Accumulate[Table[If[SquareFreeQ[k^2+1], 1, 0], {k, 0, 80}]] (* Harvey P. Dale, Mar 04 2014 *)
Table[Sum[MoebiusMu[k^2 + 1]^2, {k, 0, n}], {n, 0, 100}] (* Wesley Ivan Hurt, Jul 15 2015 *)
PROG
(PARI) a(n)={my(k, r=0); for(k=0, n, if(issquarefree(k^2+1), r++)); return(r); }
main(size)=my(n); vector(size, n, a(n-1)) /* Anders Hellström, Jul 15 2015 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Nov 08 2006
STATUS
approved