A097501 p^q + q^p for twin primes p and q.
368, 94932, 36314872537968, 244552822542936127033092, 2177185942561672462146321298650240665136431700, 2246585380039521951243337580678537047744572047581514711375688196554564
Offset: 2
Keywords
Examples
Consider the second twin prime pair (5,7). 5^7 + 7^5 = 94932, the 2nd entry.
Crossrefs
Cf. A051442.
Programs
-
Mathematica
lst={}; Do[p=Prime[n]; If[PrimeQ[q=p+2],a=(p^q+q^p); AppendTo[lst,a]],{n,2*4!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 16 2009 *) #[[1]]^#[[2]]+#[[2]]^#[[1]]&/@Select[Partition[Prime[Range[20]],2,1],#[[2]] - #[[1]]==2&] (* Harvey P. Dale, Sep 07 2019 *)
-
PARI
f(n) = for(x=1,n,p=prime(x);q=prime(x+1);if(q-p==2,v=p^q+q^p;print1(v",")))
Comments