login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A069003 Smallest integer d such that n^2 + d^2 is a prime number. 19
1, 1, 2, 1, 2, 1, 2, 3, 4, 1, 4, 7, 2, 1, 2, 1, 2, 5, 6, 1, 4, 5, 8, 1, 4, 1, 2, 5, 4, 11, 4, 3, 2, 5, 2, 1, 2, 3, 10, 1, 4, 5, 8, 9, 2, 5, 2, 13, 4, 7, 4, 3, 10, 1, 4, 1, 2, 3, 6, 13, 10, 3, 32, 9, 2, 1, 2, 5, 10, 3, 6, 5, 2, 1, 4, 5, 10, 7, 4, 7, 4, 3, 18, 1, 2, 9, 2, 3, 4, 1, 4, 7, 8, 1, 2, 5, 2, 3, 4, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

With i being the imaginary unit, n + di is the smallest Gaussian prime with real part n and a positive imaginary part. Likewise for n - di. See A002145 for Gaussian primes with imaginary part 0. - Alonso del Arte, Feb 07 2011

Conjecture: a(n) does not exceed 4*sqrt(n+1) for any positive integer n. - Zhi-Wei Sun, Apr 15 2013

Conjecture holds for the first 15*10^6 terms. - Joerg Arndt, Aug 19 2014

Infinitely many d exist such that n^2 + d^2 is prime, under Schinzel's Hypothesis H; see Sierpinski (1988), p. 221. - Jonathan Sondow, Nov 09 2015

REFERENCES

W. Sierpinski, Elementary Theory of Numbers, 2nd English edition, revised and enlarged by A. Schinzel, Elsevier, 1988.

LINKS

T. D. Noe and Zhi-Wei Sun (with the first 1000 terms from Noe), Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Gaussian Prime

Wikipedia, Schinzel's Hypothesis H

EXAMPLE

a(5)=2 because 2 is the smallest integer d such that 5^2+d^2 is a prime number.

MAPLE

f:= proc(n) local d;

     for d from 1+(n mod 2) by 2 do

       if isprime(n^2+d^2) then return d fi

     od

end proc:

f(1):= 1:

map(f, [$1..1000]); # Robert Israel, Jul 06 2015

MATHEMATICA

imP4P[n_] := Module[{k = 1}, While[Not[PrimeQ[n^2 + k^2]], k++]; k]; Table[imP4P[n], {n, 50}] (* Alonso del Arte, Feb 07 2011 *)

PROG

(PARI) a(n)=my(k); while(!isprime(n^2+k++^2), ); k \\ Charles R Greathouse IV, Mar 20 2013

CROSSREFS

Cf. A068486 (lists the prime numbers n^2 + d^2).

Cf. A185636, A204065.

Cf. A239388, A239389 (record values).

Cf. A053000.

Sequence in context: A177803 A274080 A074641 * A087855 A083409 A317586

Adjacent sequences:  A069000 A069001 A069002 * A069004 A069005 A069006

KEYWORD

easy,nonn

AUTHOR

T. D. Noe, Apr 02 2002

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 2 11:35 EDT 2020. Contains 334771 sequences. (Running on oeis4.)