A296021 Number of primes of the form 4*k+1 <= 4*n+1.
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
Keywords
References
- G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 23.
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..10000
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)
Comments