OFFSET
1,2
FORMULA
EXAMPLE
For n=2, prime(2+1)^2 - prime(2)^2 = 5^2 - 3^2 = 4^2, the second entry.
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 *)
PROG
(PARI) g1(n) = for(x=1, n, y=prime(x+1)^x-prime(x)^x; print1(y", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Jun 17 2007
EXTENSIONS
More terms from Emeric Deutsch, Jul 09 2007
STATUS
approved