OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..2000
EXAMPLE
2^3-1^2=7, 3^3-2^2=23, ...
MATHEMATICA
a[n_]:=(n+1)^3-n^2; lst={}; Do[If[PrimeQ[a[n]], AppendTo[lst, a[n]]], {n, 6!}]; lst
Select[(#+1)^3-#^2&/@Range[200], PrimeQ] (* Harvey P. Dale, Mar 14 2011 *)
PROG
(Magma) [a: n in [0..100] | IsPrime(a) where a is (n+1)^3 - n^2]; // Vincenzo Librandi, Sep 02 2016
(PARI) for(n=1, 1e3, if(isprime(t=(n+1)^3 - n^2), print1(t", "))) \\ Charles R Greathouse IV, Sep 02 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jan 04 2009
STATUS
approved