|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|