login
A070316
Numbers n such that nextprime(n^2)-n^2 (n>=1) sets a new record.
4
1, 3, 5, 11, 18, 23, 42, 63, 69, 102, 128, 143, 226, 254, 349, 370, 590, 757, 833, 873, 1110, 1165, 5018, 14908, 49495, 87598, 106359, 185179, 269697, 558269, 1070246, 1673629, 4292936, 43957056, 148793437, 982920306, 1569443693, 4556758439
OFFSET
1,2
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..45, Dec 29 2007
EXAMPLE
nextprime(63^2) - 63^2 = 3989 - 3969 = 20, giving the terms 63 in the present sequence and 20 in A070317.
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}]
PROG
(PARI) A070316(n, show_all=0)={my(k=0, r=0); for(n=1, n, until(nextprime(k++^2)-k^2>r , ); r=nextprime(k^2)-k^2; show_all&print1(k", ")); k} \\ M. F. Hasler, Mar 23 2013
CROSSREFS
Positions of record values in A053000 for n >= 1. Cf. A070317.
Sequence in context: A270778 A267030 A128949 * A298121 A373273 A244473
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
Further terms from Charles R Greathouse IV, Jun 16 2007
Typo in a(38) corrected by M. F. Hasler, Mar 23 2013
STATUS
approved