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!)
A059844 a(n) = smallest nonzero square x^2 such that n+x^2 is prime. 2
1, 1, 4, 1, 36, 1, 4, 9, 4, 1, 36, 1, 4, 9, 4, 1, 36, 1, 4, 9, 16, 1, 36, 49, 4, 81, 4, 1, 144, 1, 16, 9, 4, 9, 36, 1, 4, 9, 4, 1, 576, 1, 4, 9, 16, 1, 36, 25, 4, 9, 16, 1, 36, 25, 4, 81, 4, 1, 324, 1, 36, 9, 4, 9, 36, 1, 4, 81, 4, 1, 36, 1, 16, 9, 4, 25, 36, 1, 4, 9, 16, 1, 144, 25, 4, 81 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(n) = 1 for n in A006093. - Robert Israel, Dec 31 2023
LINKS
FORMULA
a(n) + n is the smallest prime of the form x^2 + n.
EXAMPLE
a(24) = 49 because 49 + 24 = 73 is prime and 1 + 24 = 25, 4 + 24 = 28, 9 + 24 = 33, 16 + 24 = 40, 25 + 24 = 49, and 36 + 24 = 60 are composite.
MAPLE
f:= proc(n) local x;
for x from 1 + (n mod 2) by 2 do
if isprime(n+x^2) then return x^2 fi;
od
end proc:
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Dec 31 2023
MATHEMATICA
sqs[n_]:=Module[{q=1}, While[!PrimeQ[n+q], q=(Sqrt[q]+1)^2]; q]; Array[ sqs, 90] (* Harvey P. Dale, Aug 11 2017 *)
CROSSREFS
Sequence in context: A266240 A322601 A075804 * A277169 A144284 A144285
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 26 2001
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 April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)