A070317 Record values of nextprime(n^2)-n^2, cf. A070316.
1, 2, 4, 6, 7, 12, 13, 20, 22, 23, 27, 28, 33, 37, 42, 43, 49, 52, 54, 58, 71, 108, 147, 163, 202, 225, 232, 270, 292, 328, 331, 388, 541, 613, 712, 773, 780, 868, 869, 964, 993, 1024, 1045, 1065, 1083
Offset: 1
Keywords
Examples
nextprime(63^2) - 63^2 = 3989 - 3969 = 20, giving the terms 63 in A070316 and 20 in the present sequence.
Crossrefs
Cf. A070316.
Programs
-
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}]
Formula
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