login
A338155
(Smallest prime >= 3^n) - (largest prime <= 3^n).
3
0, 4, 6, 4, 10, 6, 24, 10, 6, 22, 36, 74, 30, 10, 18, 124, 44, 20, 70, 16, 60, 6, 52, 30, 34, 22, 42, 48, 144, 30, 20, 104, 122, 90, 50, 12, 52, 18, 140, 156, 72, 126, 126, 42, 68, 90, 98, 100, 66, 74, 50, 174, 30, 38, 126, 72, 30, 378, 102, 176, 108, 130
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
FORMULA
a(n) = A013598(n) + A013604(n) for n > 1.
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
Cf. A058249 (for 2^n), A338419 (for 5^n), A338376 (for 6^n), A038804 (for 10^n).
Sequence in context: A256415 A349093 A143545 * A328045 A277278 A328722
KEYWORD
nonn
AUTHOR
A.H.M. Smeets, Oct 25 2020
STATUS
approved