OFFSET
1,5
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Binomial Coefficient
FORMULA
A007318(n,a(n)) mod n = 0.
a(p) = floor(p/2) for primes p.
MATHEMATICA
gk[n_]:=Module[{k=Floor[n/2]}, While[!Divisible[Binomial[n, k], n], k--]; k]; Array[gk, 80] (* Harvey P. Dale, Nov 22 2013 *)
PROG
(PARI) a(n) = if (n>1, my(k=n\2); while (binomial(n, k) % n, k--); k, 0); \\ Michel Marcus, Nov 06 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 03 2006
STATUS
approved