OFFSET
0,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
EXAMPLE
For n = 8, the primes are 2, 29, 71, 29, 2, so a(n) = 5.
a(n) = 6 for n = 9, 10, 11, 12. Also, a(n) = 10 for n = 149, ..., 154.
MATHEMATICA
a[n_] := Count[Table[PrimeQ[Binomial[n, w]+1], {w, 0, n}], True]
PROG
(PARI) a(n) = sum(j=0, n, isprime(1 + binomial(n, j))); \\ Michel Marcus, Oct 30 2018
(PARI) a(n) = 2 * sum(k=0, (n-1)\2, isprime(binomial(n, k) + 1)) + if(!(n%2), isprime(binomial(n, n/2) + 1)); \\ Amiram Eldar, Jul 18 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jan 15 2002
STATUS
approved