|
|
A242991
|
|
Smallest prime p such that p - floor(sqrt(p))^2 = n^2.
|
|
1
|
|
|
2, 13, 73, 97, 281, 397, 1493, 1153, 2017, 2909, 4217, 6073, 8269, 12517, 13681, 17417, 22193, 26893, 34217, 40801, 51517, 60509, 72353, 89977, 101749, 115597, 151273, 158393, 180617, 204301, 237157, 278753, 335173, 336397, 388109, 435577, 477469, 527069, 585217, 652849, 717397
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Also the smallest prime p = n^2 + x^2 such that x > n^2/2.
For n < 10^6, a(7) > a(8) is the only place where the sequence is not increasing. - Derek Orr, Aug 17 2014
|
|
LINKS
|
|
|
EXAMPLE
|
2 = 1^2 + 1^2,
13 = 2^2 + 3^2,
73 = 3^2 + 8^2,
97 = 4^2 + 9^2,
281 = 5^2 + 16^2,
397 = 6^2 + 19^2,
...
|
|
MAPLE
|
a:= proc(n) local x, p; for x from ceil(n^2/2) do p:= n^2+x^2; if isprime(p) then return(p) fi od end proc:
|
|
MATHEMATICA
|
spp[n_]:=Module[{p=2}, While[p-Floor[Sqrt[p]]^2!=n^2, p=NextPrime[p]]; p]; Array[spp, 50] (* Harvey P. Dale, Jan 10 2022 *)
|
|
PROG
|
(PARI)
a(n)=k=ceil(n^2/2); while(!ispseudoprime(n^2+k^2), k++); return(n^2+k^2)
vector(100, n, a(n)) \\ Derek Orr, Aug 17 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|