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.

Showing 1-2 of 2 results.

A295996 One quarter of number of Gaussian primes whose norm is 4*n+1 or less.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Dec 02 2017

Keywords

Examples

			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.
		

Crossrefs

Programs

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

A091100 Number of Gaussian primes whose norm is less than 10^n.

Original entry on oeis.org

16, 100, 668, 4928, 38404, 313752, 2658344, 23046512, 203394764, 1820205436, 16472216912, 150431552012, 1384262129028, 12819767598972, 119378281788240, 1116953361826164
Offset: 1

Views

Author

T. D. Noe, Dec 19 2003

Keywords

Crossrefs

Cf. A091098 (number of primes of the form 4k+1 less than 10^n), A091099 (number of primes of the form 4k+3 less than 10^n), A091101, A091102.
Cf. A091134 (number of Gaussian primes whose modulus is less than 10^n).

Programs

  • Mathematica
    Table[lim2=10^n; lim1=Floor[Sqrt[lim2]]; cnt=0; Do[If[x^2+y^2True], cnt++ ], {x, -lim1, lim1}, {y, -lim1, lim1}]; cnt, {n, 6}]

Formula

a(2n) = 8*A091098(2n) + 4*A091099(n) + 4.
a(n) ~ 4 Li(10^n) ~ k/n * 10^n, where k = 4/log(10) = 1.737.... - Charles R Greathouse IV, Oct 24 2012

Extensions

a(10)-a(16) from Seiichi Manyama using the data in A091098, Dec 03 2017
Showing 1-2 of 2 results.