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!)
A284376 a(n) is the least nonnegative integer such that n + i*a(n) is a Gaussian prime. 1
3, 1, 1, 0, 1, 2, 1, 0, 3, 4, 1, 0, 7, 2, 1, 2, 1, 2, 5, 0, 1, 4, 5, 0, 1, 4, 1, 2, 5, 4, 11, 0, 3, 2, 5, 2, 1, 2, 3, 10, 1, 4, 5, 0, 9, 2, 5, 0, 13, 4, 7, 4, 3, 10, 1, 4, 1, 2, 3, 0, 13, 10, 3, 32, 9, 2, 1, 0, 5, 10, 3, 0, 5, 2, 1, 4, 5, 10, 7, 0, 7, 4, 3, 0, 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

0,1

LINKS

Lars-Erik Svahn, Table of n, a(n) for n = 0..10000

Lars-Erik Svahn, numbertheory.4th

Akshaa Vatwani, Bounded gaps between Gaussian primes, Journal of Number Theory, Volume 171, February 2017, Pages 449-473.

Wikipedia, Gaussian prime

Index entries for Gaussian integers and primes

FORMULA

From Michel Marcus, Mar 30 2017: (Start)

a(n) = 0 for n in A002145.

a(n) = 1 for n in A005574.

(End)

a(n) = A069003(n) if n is not in A002145. - Robert Israel, Apr 07 2017

MAPLE

f:= proc(n) local k;

  for k from 0 do if GaussInt:-GIprime(n+I*k) then return k fi od

end proc:

map(f, [$0..100]); # Robert Israel, Apr 07 2017

MATHEMATICA

Table[k = 0; While[! PrimeQ[n + I k, GaussianIntegers -> True], k++]; k, {n, 0, 100}] (* Michael De Vlieger, Mar 29 2017 *)

PROG

(ANS-Forth)

s" numbertheory.4th" included

: 3mod4_prime \ n -- flag

  abs dup isprime swap 3 and 3 = and ;

: isGaussianPrime \ a b -- flag

  over 0= if nip 3mod4_prime exit then

  dup 0= if drop 3mod4_prime exit then

  dup * swap dup * + isprime ;

: Gauss_prime \ n -- a(n)

  0

  begin 2dup isGaussianPrime 0=

  while 1+

  repeat nip ;

CROSSREFS

Cf. A002145, A005574, A069003.

Sequence in context: A338638 A062172 A196838 * A088205 A318923 A336111

Adjacent sequences:  A284373 A284374 A284375 * A284377 A284378 A284379

KEYWORD

nonn

AUTHOR

Lars-Erik Svahn, Mar 25 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 April 11 18:59 EDT 2021. Contains 342888 sequences. (Running on oeis4.)