login
A296021
Number of primes of the form 4*k+1 <= 4*n+1.
6
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,4
LINKS
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
p A(1, 100)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 02 2017
STATUS
approved