A224748 Given n-th prime p, a(n) = number of primes of the form p + q - 1 where q is any prime < p.
0, 0, 1, 1, 2, 3, 3, 3, 2, 3, 6, 6, 5, 8, 4, 4, 4, 11, 11, 8, 9, 11, 4, 5, 13, 9, 11, 7, 13, 5, 17, 10, 9, 15, 7, 19, 17, 18, 10, 8, 8, 25, 12, 17, 12, 18, 29, 23, 12, 21, 12, 15, 28, 18, 11, 11, 12, 32, 25, 19, 22, 14, 29, 17, 27, 14, 40, 36, 18, 29, 16, 13
Offset: 1
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
Programs
-
Maple
a:= n-> add(`if`(isprime(ithprime(n)+ithprime(i)-1), 1, 0), i=1..n-1): seq(a(n), n=1..100); # Alois P. Heinz, Apr 18 2013
-
Mathematica
Table[p = Prime[n]; c = 0; i = 1; While[i < n, If[PrimeQ[p + Prime[i] - 1], c = c + 1]; i++]; c, {n, 72}] Table[Count[Prime[n]+Prime[Range[n-1]]-1,?PrimeQ],{n,80}] (* _Harvey P. Dale, Nov 04 2020 *)
Comments