A340767 Number of primes p <= 6*n + 5 that are congruent to 2 modulo 3.
2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 10, 11, 11, 12, 13, 13, 14, 15, 16, 16, 16, 17, 18, 18, 19, 19, 19, 20, 21, 22, 22, 23, 24, 24, 24, 24, 24, 25, 26, 27, 27, 28, 29, 30, 31, 31, 32, 32, 33, 33, 33, 34, 35, 35, 35, 35, 35, 36, 37, 38, 38, 38, 38, 39, 40, 40, 41, 41, 41, 42, 42
Offset: 0
Examples
There are 14 primes <= 6*16+5 = 101 that are congruent to 2 modulo 3, namely 2, 5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89, 101, so a(16) = 14.
Links
- Jianing Song, Table of n, a(n) for n = 0..10000
Programs
-
PARI
a(n) = sum(i=1, 6*n+5, isprime(i) && (i%3==2))