A341861 Number of primes among the (p-1)/2 numbers {2*p+1, 4*p+1, ..., (p-1)*p+1}, p = prime(n).
1, 1, 2, 3, 4, 3, 2, 4, 4, 3, 4, 5, 7, 8, 5, 8, 7, 9, 9, 10, 11, 11, 12, 12, 14, 13, 13, 12, 15, 14, 14, 17, 15, 19, 18, 12, 19, 13, 19, 20, 22, 20, 24, 21, 15, 21, 21, 23, 25, 26, 23, 26, 26, 19, 23, 27, 24, 29, 27, 26, 28, 31, 29, 30, 25, 30, 30, 34, 31, 29, 35
Offset: 2
Keywords
Examples
Let P denote the set of prime numbers. Then: a(8) = #({39, 77, 115, 153, 191, 229, 267, 305, 343} intersect P) = #{191, 229} = 2. a(11) = #({63, 125, 187, 249, 311, 373, 435, 497, 559, 621, 683, 745, 807, 869, 931} intersect P) = #{311, 373, 683} = 3.
Links
- Jianing Song, Table of n, a(n) for n = 2..10000
Crossrefs
Cf. A070846.
Programs
-
PARI
a(n) = my(p=prime(n)); sum(k=1, (p-1)/2, isprime(2*k*p+1))
Comments