OFFSET
1,2
FORMULA
EXAMPLE
nextprime(63^2) - 63^2 = 3989 - 3969 = 20, giving the terms 63 in A070316 and 20 in the present sequence.
MATHEMATICA
NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; d = 0; Do[m = n; a = NextPrim[n^2] - n^2; If[a > d, d = a; Print[n]], {n, 1, 10^8}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Donald S. McDonald, May 11 2002
EXTENSIONS
Edited by N. J. A. Sloane and Robert G. Wilson v, May 11 2002
More terms from Ralf Stephan, Oct 14 2002
More terms from Charles R Greathouse IV, Jun 16 2007, Aug 08 2007
More terms (using A070316) from M. F. Hasler, May 05 2013
STATUS
approved