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.

A296021 Number of primes of the form 4*k+1 <= 4*n+1.

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 3, 4, 4, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 11, 12, 12, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 17, 17, 17, 17, 18, 18, 19, 19, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 22, 23, 23, 24, 24, 24, 24, 25, 25, 25, 26, 26, 27, 28, 28
Offset: 0

Views

Author

Seiichi Manyama, Dec 02 2017

Keywords

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 23.

Crossrefs

Programs

  • Mathematica
    a[n_]:=Length[Select[Range[n],PrimeQ[4#+1] &]]; Array[a,72,0] (* Stefano Spezia, May 01 2025 *)
  • 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
    p A(1, 100)