OFFSET
1,2
COMMENTS
Size of prime gap containing the number 3^n, for n > 1.
From Gauss's prime counting function approximation, the expected gap size should be approximately n*log(3), however, the observed values seem to be closer to n*log(8.72) ~ n*log(3^2) = n*A016632.
LINKS
A.H.M. Smeets, Table of n, a(n) for n = 1..1000
MATHEMATICA
a[1] = 0; a[n_] := First @ Differences @ NextPrime[3^n, {-1, 1}]; Array[a, 60] (* Amiram Eldar, Oct 30 2020 *)
PROG
(PARI) a(n) = if (n==1, 0, nextprime(3^n) - precprime(3^n)); \\ Michel Marcus, Oct 25 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
A.H.M. Smeets, Oct 25 2020
STATUS
approved