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!)
A295996 One quarter of number of Gaussian primes whose norm is 4*n+1 or less. 5
0, 3, 4, 6, 8, 8, 8, 10, 10, 12, 14, 14, 15, 17, 17, 19, 19, 19, 21, 21, 21, 21, 23, 23, 25, 27, 27, 29, 31, 31, 32, 32, 32, 32, 34, 34, 34, 36, 36, 38, 38, 38, 38, 40, 40, 42, 42, 42, 44, 46, 46, 46, 46, 46, 46, 46, 46, 48, 50, 50, 52, 52, 52, 52, 54, 54, 54, 56 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Seiichi Manyama, Table of n, a(n) for n = 0..10000

Eric Weisstein's World of Mathematics, Gaussian Prime

EXAMPLE

The Gaussian primes whose norm is 9 or less;

      *        3i,

    *   *      -1+2i, 1+2i

  * *   * *    -2+i, -1+i, 1+i, 2+i

*           *  -3, 3

  * *   * *    -2-i, -1-i, 1-i, 2-i

    *   *      -1-2i, 1-2i

      *        -3i

               a(2) = 16/4 = 4.

PROG

(Ruby)

require 'prime'

def A(k, n)

  ary = []

  cnt = 0

  k.step(4 * n + k, 4){|i|

    cnt += 1 if i.prime?

    ary << cnt

  }

  ary

end

def A295996(n)

  ary1 = A(1, n)

  ary3 = A(3, Math.sqrt(n).to_i) + [0]

  [0] + (1..n).map{|i| 1 + 2 * ary1[i] + ary3[(Math.sqrt(4 * i + 1).to_i - 3) / 4]}

end

p A295996(100)

CROSSREFS

Cf. A016813, A055029, A091100, A091134, A135462, A296020, A296021.

Sequence in context: A141219 A069211 A242822 * A240675 A072152 A199015

Adjacent sequences:  A295993 A295994 A295995 * A295997 A295998 A295999

KEYWORD

nonn

AUTHOR

Seiichi Manyama, Dec 02 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 September 28 10:51 EDT 2020. Contains 337393 sequences. (Running on oeis4.)