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!)
A161503 a(n) = NextPrime(n^n) - PrevPrime(n^n). 6
2, 6, 6, 16, 14, 6, 46, 20, 52, 104, 54, 28, 44, 80, 72, 92, 172, 20, 142, 34, 110, 134, 130, 98, 106, 78, 174, 306, 26, 132, 54, 258, 116, 78, 50, 90, 448, 66, 214, 302, 140, 352, 466, 246, 670, 594, 396, 20, 244, 228, 640, 546, 462, 354, 1040, 408, 176, 564, 760 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
FORMULA
a(n) = A074966(n) + A074967(n) = A013633(A000312(n)). - R. J. Mathar, Jun 12 2009
EXAMPLE
3 <- 2^2 -> 5; 5 - 3 = 2;
23 <- 3^3 -> 29; 29 - 23 = 6.
MAPLE
for n from 2 to 100 do nn := n^n ; printf("%d, ", nextprime(nn)-prevprime(nn) ) ; od: # R. J. Mathar, Jun 12 2009
MATHEMATICA
PrimeNext[n_]:=Module[{k}, k=n+1; While[ !PrimeQ[k], k++ ]; k]; PrimePrev[n_]:=Module[{k}, k=n-1; While[ !PrimeQ[k], k-- ]; k]; DeltaY[n_]:=PrimeNext[n]-PrimePrev[n]; lst={}; Do[AppendTo[lst, DeltaY[n^n]], {n, 2, 5!}]; lst
npnn[n_]:=Module[{nn=n^n}, NextPrime[nn]-NextPrime[nn, -1]]; Array[npnn, 60, 2] (* Harvey P. Dale, Dec 07 2013 *)
CROSSREFS
Sequence in context: A349288 A098571 A194120 * A019076 A197109 A111410
KEYWORD
nonn
AUTHOR
EXTENSIONS
Offset changed by R. J. Mathar, Jun 12 2009
STATUS
approved

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 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)