login
Smallest k > 1 such that n divides binomial(n,k).
1

%I #10 May 24 2021 23:31:39

%S 2,3,2,5,2,3,2,3,2,5,2,3,2,3,2,4,2,3,2,3,2,5,2,3,2,3,2,7,2,3,2,3,2,5,

%T 2,3,2,3,2,4,2,3,2,3,2,5,2,3,2,3,2,5,2,3,2,3,2,7,2,3,2,3,2,4,2,3,2,3,

%U 2,5,2,3,2,3,2,5,2,3,2,3,2,5,2,3,2,3,2

%N Smallest k > 1 such that n divides binomial(n,k).

%H Antti Karttunen, <a href="/A217607/b217607.txt">Table of n, a(n) for n = 3..65539</a>

%e a(6) = 5 because 6 divides binomial(6,5) = 6 and 6 does not divide binomial(6,k) for 1 < k < 5.

%p with(numtheory):for n from 3 to 100 do:ii:=0: for k from 2 to n while(ii=0) do:z:=binomial(n,k):if irem(z,n)=0 then ii:=1:printf(`%d, `,k):else fi:od:od:

%t Table[k = 2; While[Mod[Binomial[n, k], n] > 0, k++]; k, {n, 3, 100}]

%o (PARI) A217607(n) = for(k=2,oo,if(!(binomial(n,k)%n),return(k))); \\ _Antti Karttunen_, May 24 2021

%K nonn

%O 3,1

%A _Michel Lagneau_, Oct 08 2012