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

%I #14 Mar 11 2020 23:02:13

%S 2,6,6,16,14,6,46,20,52,104,54,28,44,80,72,92,172,20,142,34,110,134,

%T 130,98,106,78,174,306,26,132,54,258,116,78,50,90,448,66,214,302,140,

%U 352,466,246,670,594,396,20,244,228,640,546,462,354,1040,408,176,564,760

%N a(n) = NextPrime(n^n) - PrevPrime(n^n).

%H Hugo Pfoertner, <a href="/A161503/b161503.txt">Table of n, a(n) for n = 2..1000</a>

%F a(n) = A074966(n) + A074967(n) = A013633(A000312(n)). - _R. J. Mathar_, Jun 12 2009

%e 3 <- 2^2 -> 5; 5 - 3 = 2;

%e 23 <- 3^3 -> 29; 29 - 23 = 6.

%p for n from 2 to 100 do nn := n^n ; printf("%d,",nextprime(nn)-prevprime(nn) ) ; od: # _R. J. Mathar_, Jun 12 2009

%t 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

%t npnn[n_]:=Module[{nn=n^n},NextPrime[nn]-NextPrime[nn,-1]]; Array[npnn,60,2] (* _Harvey P. Dale_, Dec 07 2013 *)

%Y Cf. A074966, A074967.

%Y Cf. A000312, A013633.

%K nonn

%O 2,1

%A _Vladimir Joseph Stephan Orlovsky_, Jun 11 2009

%E Offset changed by _R. J. Mathar_, Jun 12 2009

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 August 11 14:50 EDT 2024. Contains 375073 sequences. (Running on oeis4.)