cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A284376 a(n) is the least nonnegative integer such that n + i*a(n) is a Gaussian prime.

This page as a plain text file.
%I A284376 #38 Feb 27 2018 16:23:46
%S A284376 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,
%T A284376 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,
%U A284376 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
%N A284376 a(n) is the least nonnegative integer such that n + i*a(n) is a Gaussian prime.
%H A284376 Lars-Erik Svahn, <a href="/A284376/b284376.txt">Table of n, a(n) for n = 0..10000</a>
%H A284376 Lars-Erik Svahn, <a href="https://github.com/Lehs/ANS-Forth-libraries">numbertheory.4th</a>
%H A284376 Akshaa Vatwani, <a href="http://dx.doi.org/10.1016/j.jnt.2016.07.008">Bounded gaps between Gaussian primes</a>, Journal of Number Theory, Volume 171, February 2017, Pages 449-473.
%H A284376 Wikipedia, <a href="https://en.wikipedia.org/wiki/Gaussian_integer#Gaussian_primes">Gaussian prime</a>
%H A284376 <a href="/index/Ga#gaussians">Index entries for Gaussian integers and primes</a>
%F A284376 From _Michel Marcus_, Mar 30 2017: (Start)
%F A284376 a(n) = 0 for n in A002145.
%F A284376 a(n) = 1 for n in A005574.
%F A284376 (End)
%F A284376 a(n) = A069003(n) if n is not in A002145. - _Robert Israel_, Apr 07 2017
%p A284376 f:= proc(n) local k;
%p A284376   for k from 0 do if GaussInt:-GIprime(n+I*k) then return k fi od
%p A284376 end proc:
%p A284376 map(f, [$0..100]); # _Robert Israel_, Apr 07 2017
%t A284376 Table[k = 0; While[! PrimeQ[n + I k, GaussianIntegers -> True], k++]; k, {n, 0, 100}] (* _Michael De Vlieger_, Mar 29 2017 *)
%o A284376 (ANS-Forth)
%o A284376 s" numbertheory.4th" included
%o A284376 : 3mod4_prime \ n -- flag
%o A284376   abs dup isprime swap 3 and 3 = and ;
%o A284376 : isGaussianPrime \ a b -- flag
%o A284376   over 0= if nip 3mod4_prime exit then
%o A284376   dup 0= if drop 3mod4_prime exit then
%o A284376   dup * swap dup * + isprime ;
%o A284376 : Gauss_prime \ n -- a(n)
%o A284376   0
%o A284376   begin 2dup isGaussianPrime 0=
%o A284376   while 1+
%o A284376   repeat nip ;
%Y A284376 Cf. A002145, A005574, A069003.
%K A284376 nonn
%O A284376 0,1
%A A284376 _Lars-Erik Svahn_, Mar 25 2017