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!)
A284211 a(n) is the least positive integer such that n^2 + a(n)^2 and n^2 + (a(n) + 2)^2 are primes. 3
2, 1, 8, 9, 2, 29, 8, 3, 14, 1, 4, 23, 8, 9, 2, 29, 8, 5, 14, 1, 44, 13, 18, 59, 4, 9, 20, 13, 4, 11, 4, 3, 188, 9, 16, 149, 28, 13, 44, 1, 44, 23, 8, 19, 14, 19, 8, 35, 4, 17, 14, 3, 10, 59, 4, 9, 50, 3, 24, 29, 24, 43, 38, 9, 2, 89, 18, 5, 194, 17, 14, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

z = n + i*a(n) and z' = n + i*(a(n) + 2) are two Gaussian primes such that |z - z'| = 2, corresponding to twin primes.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000 (first 99 terms from Lars-Erik Svahn)

Lars-Erik Svahn, numbertheory.4th

Akshaa Vatwani, Bounded gaps between Gaussian primes, J. of Number Theory 171 (2017), 449-473.

EXAMPLE

a(1)=2: 1^2 + 1^2 = 2 is a prime but 1 + (1 + 2)^2 = 10 is not, while 1^2 + 2^2 = 5 and 1^2 + (2+2)^2 = 17 are both primes.

MAPLE

f:= proc(n) local k, pp, p;

    pp:= false;

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

      p:= isprime(n^2 + k^2);

      if p and pp then return k-2 fi;

      pp:= p;

    od;

end proc:

map(f, [$1..100]); # Robert Israel, Mar 30 2017

MATHEMATICA

a[n_] := Block[{k = Mod[n, 2] + 1}, While[! PrimeQ[n^2 + k^2] || ! PrimeQ[n^2 + (k + 2)^2], k += 2]; k]; Array[a, 72] (* Giovanni Resta, Mar 23 2017 *)

PROG

(ANS-Forth)

s" numbertheory.4th" included

: Gauss_twins \ n -- a(n)

  dup * locals| square | 0

  begin 1+ dup dup * square + isprime

     over 2 + dup * square + isprime and

  until ;

(PARI) a(n) = my(k=n%2+1); while (!(isprime(n^2+k^2) && isprime(n^2+(k+2)^2)), k+=2); k  \\ Michel Marcus, Mar 25 2017

CROSSREFS

Cf. A069003.

Sequence in context: A036296 A078105 A075513 * A246403 A258502 A011019

Adjacent sequences:  A284208 A284209 A284210 * A284212 A284213 A284214

KEYWORD

nonn

AUTHOR

Lars-Erik Svahn, Mar 23 2017

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 March 31 19:37 EDT 2020. Contains 333151 sequences. (Running on oeis4.)