The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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:
seq(a(n), n=1..100); # Robert Israel, Aug 17 2014
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
Cf. A145016.
Sequence in context: A289790 A109112 A163190 * A240549 A004027 A263840
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Aug 17 2014
EXTENSIONS
More terms from Derek Orr, Aug 17 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 16:26 EDT 2024. Contains 372554 sequences. (Running on oeis4.)