login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338155 (Smallest prime >= 3^n) - (largest prime <= 3^n). 3

%I #101 Nov 30 2020 08:58:49

%S 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 22,42,48,144,30,20,104,122,90,50,12,52,18,140,156,72,126,126,42,68,

%U 90,98,100,66,74,50,174,30,38,126,72,30,378,102,176,108,130

%N (Smallest prime >= 3^n) - (largest prime <= 3^n).

%C Size of prime gap containing the number 3^n, for n > 1.

%C 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 A.H.M. Smeets, <a href="/A338155/b338155.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A013598(n) + A013604(n) for n > 1.

%t a[1] = 0; a[n_] := First @ Differences @ NextPrime[3^n, {-1, 1}]; Array[a, 60] (* _Amiram Eldar_, Oct 30 2020 *)

%o (PARI) a(n) = if (n==1, 0, nextprime(3^n) - precprime(3^n)); \\ _Michel Marcus_, Oct 25 2020

%Y Cf. A013598, A013604, A016632.

%Y Cf. A058249 (for 2^n), A338419 (for 5^n), A338376 (for 6^n), A038804 (for 10^n).

%K nonn

%O 1,2

%A _A.H.M. Smeets_, Oct 25 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)