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.
%I A338155 #101 Nov 30 2020 08:58:49 %S A338155 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, %T A338155 22,42,48,144,30,20,104,122,90,50,12,52,18,140,156,72,126,126,42,68, %U A338155 90,98,100,66,74,50,174,30,38,126,72,30,378,102,176,108,130 %N A338155 (Smallest prime >= 3^n) - (largest prime <= 3^n). %C A338155 Size of prime gap containing the number 3^n, for n > 1. %C A338155 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. %H A338155 A.H.M. Smeets, <a href="/A338155/b338155.txt">Table of n, a(n) for n = 1..1000</a> %F A338155 a(n) = A013598(n) + A013604(n) for n > 1. %t A338155 a[1] = 0; a[n_] := First @ Differences @ NextPrime[3^n, {-1, 1}]; Array[a, 60] (* _Amiram Eldar_, Oct 30 2020 *) %o A338155 (PARI) a(n) = if (n==1, 0, nextprime(3^n) - precprime(3^n)); \\ _Michel Marcus_, Oct 25 2020 %Y A338155 Cf. A013598, A013604, A016632. %Y A338155 Cf. A058249 (for 2^n), A338419 (for 5^n), A338376 (for 6^n), A038804 (for 10^n). %K A338155 nonn %O A338155 1,2 %A A338155 _A.H.M. Smeets_, Oct 25 2020