cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A124808 Number of numbers k <= n such that k^2 + 1 is squarefree.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 30, 31, 32, 33, 34, 35, 35, 36, 37, 37, 38, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 61, 62, 62, 63, 64
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 08 2006

Keywords

Crossrefs

Programs

  • 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 *)
  • 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 */

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