login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = (least prime > binomial(2n, n)) - (greatest prime < binomial(2n, n)).
2

%I #17 Jun 04 2023 23:50:53

%S 2,4,4,6,10,20,36,4,24,10,28,6,44,32,54,98,64,20,174,76,110,84,72,66,

%T 68,102,300,74,62,104,230,176,108,126,124,96,38,70,48,228,240,38,196,

%U 210,38,260,466,72,60,36,250,156,50,46,102,84,26,240,372,90,54,360,50,276,314,408,32,168,164

%N a(n) = (least prime > binomial(2n, n)) - (greatest prime < binomial(2n, n)).

%F a(n) = A359292(n) - A359293(n-1).

%e 5 < 6 < 7, so a(2) = 7 - 5 = 2;

%e 19 < 20 < 23, so a(3) = 23 - 19 = 4;

%e 67 < 70 < 71, so a(4) = 71 - 67 = 4;

%e 251 < 252 < 257, so a(5) = 257 - 251 = 6.

%t t = Table[Binomial[2 n, n], {n, 1, 70}];

%t u = NextPrime[t]; v = Rest[NextPrime[t, -1]];

%t Rest[u] - v

%o (PARI) a(n) = my(c=binomial(2*n,n)); nextprime(c+1) - precprime(c-1); \\ _Michel Marcus_, Dec 24 2022

%Y Cf. A000040, A000984, A359292, A359293.

%K nonn

%O 2,1

%A _Clark Kimberling_, Dec 24 2022