A130606 a(n) = prime(n+1)^n - prime(n)^n where prime(n) is the n-th prime number.
1, 16, 218, 12240, 210242, 19310760, 483533066, 61327422240, 12705993314406, 398921053680600, 152509144883055582, 15980538294526150800, 793161021967277155922, 182781628843528905568920, 61073803538208251485772814
Offset: 1
Keywords
Examples
For n=2, prime(2+1)^2 - prime(2)^2 = 5^2 - 3^2 = 4^2, the second entry.
Programs
-
Maple
a := proc (n) options operator, arrow; ithprime(n+1)^n-ithprime(n)^n end proc: seq(a(n), n = 1 .. 15); # Emeric Deutsch, Jul 09 2007
-
Mathematica
n[x_]:=Module[{pn=Prime[x]},(NextPrime[pn])^x-pn^x]; n/@Range[20] (* Harvey P. Dale, Apr 11 2011 *)
-
PARI
g1(n) = for(x=1,n,y=prime(x+1)^x-prime(x)^x;print1(y","))
Formula
Extensions
More terms from Emeric Deutsch, Jul 09 2007