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.

A071868 Number of integers k (1 <= k <= n) such that k^2+1 is prime.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16
Offset: 1

Views

Author

Benoit Cloitre, Jun 09 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[If[PrimeQ[k^2+1],1,0],{k,80}]] (* Harvey P. Dale, Jan 08 2020 *)
  • PARI
    for(n=1,200,print1(sum(i=1,n,if(isprime(i^2+1)-1,0,1)),","))

Formula

Hardy and Littlewood conjectured that : a(n) ~ c* sqrt(n)/Log(n) where c = Product_{p prime} (1 - (-1)^((p-1)/2)/(p-1)) = 1.3728... (A199401).