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.

A072920 a(n) = Sum_{k=1..n} A034693(k).

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 12, 14, 16, 17, 19, 20, 24, 26, 28, 29, 35, 36, 46, 48, 50, 51, 53, 56, 60, 62, 66, 67, 69, 70, 80, 83, 85, 88, 90, 91, 95, 100, 102, 103, 105, 106, 110, 112, 116, 117, 123, 125, 129, 131, 133, 134, 136, 138, 144, 146, 150, 151, 163, 164, 170, 175
Offset: 1

Views

Author

Benoit Cloitre, Aug 11 2002

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Module[{k = 1}, While[!PrimeQ[k*n + 1], k++]; k]; Accumulate[Table[f[n], {n, 1, 100}]] (* Amiram Eldar, May 05 2022 *)
  • PARI
    f(n) = if(n<0, 0, s=1; while(isprime(s*n+1)==0, s++); s); \\ A034693
    a(n) = sum(k=1, n, f(k)); \\ Michel Marcus, May 05 2022

Formula

a(n) appears to be asymptotic to (zeta(2)-1)*n*log(n) where zeta(2)-1 = Pi^2/6-1 = 0.6449... . Example: a(10^5)/10^5/log(10^5) = 0.6449(1)... .