login
A078777
a(n) = the least positive integer k such that binomial(2k,k) + k + n is prime, if such k exists; = 0, otherwise.
0
1, 0, 1, 2, 1, 2, 3, 6, 1, 2, 1, 2, 5, 120, 1, 2, 1, 6, 3, 58, 1, 2, 7, 2, 3, 12, 1, 4, 1, 2, 3, 12, 9, 2, 1, 2, 3, 6, 1, 2, 1, 6, 19, 16, 1, 2, 13, 6, 3, 12, 1, 2, 7, 2, 5, 16, 1, 4, 1, 2, 3, 6, 15, 2, 1, 2, 3, 6, 1, 14, 1, 2, 7, 16, 3, 2, 1, 4, 3, 6, 1
OFFSET
0,4
COMMENTS
The value a(1) = 0 is conjectural. There is no k < 8.5 x 10^3 such that binomial(2k,k)+k+1 is prime.
There is no k < 10^8 making binomial(2k,k)+k+1 prime. - Charles R Greathouse IV, May 19 2013
a(1) = 0. k + 1 | binomial(2*k, k) = (2*k)! / (k!)^2 > 0 for k > 0 and k+1 | k + 1 so k+1 | binomial(2k,k)+k+1 = m * (k + 1) for m > 1 and hence isn't prime. - David A. Corneth, Mar 31 2018
EXAMPLE
k=6 is the least positive integer such that binomial(2k,k) + k + 7 is prime. Hence a(7) = 6.
MATHEMATICA
lpk[n_]:=Module[{k=1}, While[!PrimeQ[Binomial[2k, k]+k+n], k++]; k]; Join[ {1, 0}, Array[lpk, 90, 2]] (* Harvey P. Dale, Mar 31 2018 *)
PROG
(PARI) a(n) = {k = 1; if(n == 1, return(0)); while(! isprime(binomial(2*k, k) + k + n), k++; ); return (k); } \\ Michel Marcus, May 19 2013
CROSSREFS
Sequence in context: A309494 A132405 A057192 * A135938 A079210 A070861
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Jan 09 2003
EXTENSIONS
a(0) = 1 prepended to sequence to match offset by Michel Marcus, May 19 2013
Example fixed by Harvey P. Dale, Mar 31 2018
STATUS
approved