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.

This page as a plain text file.
%I A296021 #17 May 02 2025 01:46:06
%S A296021 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,
%T A296021 14,14,14,14,15,15,15,16,16,17,17,17,17,18,18,19,19,19,20,21,21,21,21,
%U A296021 21,21,21,21,22,23,23,24,24,24,24,25,25,25,26,26,27,28,28
%N A296021 Number of primes of the form 4*k+1 <= 4*n+1.
%D A296021 G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 23.
%H A296021 Seiichi Manyama, <a href="/A296021/b296021.txt">Table of n, a(n) for n = 0..10000</a>
%t A296021 a[n_]:=Length[Select[Range[n],PrimeQ[4#+1] &]]; Array[a,72,0] (* _Stefano Spezia_, May 01 2025 *)
%o A296021 (Ruby)
%o A296021 require 'prime'
%o A296021 def A(k, n)
%o A296021   ary = []
%o A296021   cnt = 0
%o A296021   k.step(4 * n + k, 4){|i|
%o A296021     cnt += 1 if i.prime?
%o A296021     ary << cnt
%o A296021   }
%o A296021   ary
%o A296021 end
%o A296021 p A(1, 100)
%Y A296021 Cf. A016813, A091098, A295996, A296020.
%K A296021 nonn
%O A296021 0,4
%A A296021 _Seiichi Manyama_, Dec 02 2017