|
|
A305866
|
|
a(n) is the number of primes that are equal to prime(n)+q+1, where prime(n) is the n-th prime number, q is a prime less than or equal to prime(n).
|
|
1
|
|
|
1, 1, 1, 2, 3, 2, 3, 3, 6, 6, 3, 4, 8, 4, 7, 9, 11, 5, 6, 9, 4, 7, 13, 15, 8, 11, 7, 13, 10, 13, 9, 16, 15, 12, 19, 9, 8, 8, 20, 20, 25, 11, 17, 11, 18, 15, 9, 13, 21, 14, 25, 28, 11, 27, 24, 26, 32, 13, 12, 22, 14, 29, 19, 27, 14, 26, 14, 14, 29, 24, 26, 40
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
LINKS
|
|
|
EXAMPLE
|
For n=1, prime(n)=2, 2+2+1=5 is prime. So a(1)=1;
For n=2, prime(n)=3, 3+2+1=6 is not prime, 3+3+1=7 is prime. So a(2)=1;
...
For n=5, prime(5)=11, 11+5+1=17, 11+7+1=19, 11+11+1=23: 3 primes found. So a(5)=3.
|
|
MATHEMATICA
|
Table[ct = 0; p = Prime[i]; Do[q = Prime[j]; If[PrimeQ[p + q + 1], ct++], {j, 1, i}]; ct, {i, 1, 72}]
|
|
PROG
|
(PARI) a(n) = sum(k=1, n, isprime(prime(n) + prime(k)+1)); \\ Michel Marcus, Jun 12 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|