OFFSET
1,2
FORMULA
Numbers k such that A067316(k) = 2.
EXAMPLE
The 2 values of j are 0 and n, which give the prime 2. The sequence includes all numbers of the form 2^m-1 since binomial(2^m-1,j) is odd for all j.
MATHEMATICA
test[n_] := Module[{}, For[i=1, 2i<=n, i++, If[PrimeQ[Binomial[n, i]+1], Return[False]]]; True]; For[n=1, True, n++, If[test[n], Print[n]]]
PROG
(PARI) isok(n) = sum(j=0, n, isprime(1 + binomial(n, j))) == 2; \\ Michel Marcus, Oct 30 2018
(PARI) is(n) = if(n == 1, 1, for(i=1, n\2, if(isprime(binomial(n, i) + 1), return(0))); 1); \\ Amiram Eldar, Jul 18 2024
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Labos Elemer, Jan 15 2002
EXTENSIONS
More terms from Jon E. Schoenfield, May 30 2010
a(35)-a(41) from Robert Israel, Mar 09 2020
a(42) from Amiram Eldar, Jul 18 2024
STATUS
approved