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.

A338419 (Smallest prime >= 5^n) - (largest prime <= 5^n).

Original entry on oeis.org

0, 6, 14, 12, 16, 10, 16, 66, 42, 10, 26, 70, 58, 14, 46, 86, 18, 114, 72, 74, 78, 72, 74, 96, 78, 14, 50, 76, 78, 130, 110, 286, 164, 170, 424, 154, 70, 132, 336, 162, 160, 90, 400, 342, 144, 36, 208, 108, 284, 98, 138, 216, 20, 66, 132, 504, 320, 120, 354
Offset: 1

Views

Author

A.H.M. Smeets, Oct 25 2020

Keywords

Comments

Size of prime gap containing the number 5^n, for n > 1.
From Gauss's prime counting function approximation, the expected gap size should be approximately n*log(5), however, the observed values seem to be closer to n*log(25) = n*A016648.
The arithmetic mean of a(n)/n for the terms 2..500 is 3.220 ~ 2*log(5) = A016648.

Crossrefs

Cf. A058249 (2^n), A338155 (3^n), A338376 (6^n), A038804 (10^n).

Programs

  • Mathematica
    a[1] = 0; a[n_] := First @ Differences @ NextPrime[5^n, {-1, 1}]; Array[a, 60] (* Amiram Eldar, Oct 30 2020 *)
  • PARI
    a(n) = if (n==1, 0, my(pw=5^n); nextprime(pw+1) - precprime(pw-1)); \\ Michel Marcus, Oct 27 2020

Formula

a(n) = A013599(n) + A013605(n) for n > 1.