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.

Original entry on oeis.org

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
Offset: 0

Views

Author

Lars-Erik Svahn, Mar 25 2017

Keywords

Crossrefs

Programs

  • 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 *)

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