OFFSET
1,2
EXAMPLE
n=23; n+1=24; 24^2-23^2=47 and 24^3-23^3=1657.
MATHEMATICA
Select[Range[576], PrimeQ[(# + 1)^2 - #^2] && PrimeQ[(# + 1)^3 - #^3] &] (* T. D. Noe, Jun 26 2013 *)
PROG
(PARI) forprime(p=3, 1e3, n=p\2; if(isprime(3*n*(n+1)+1), print1(n", "))) \\ Charles R Greathouse IV, Jun 26 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
César Aguilera, Jun 26 2013
STATUS
approved