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”).

A123621
Greatest k <= n/2 such that n divides binomial(n,k).
1
0, 1, 1, 1, 2, 1, 3, 3, 4, 4, 5, 6, 6, 5, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 28, 28, 28, 29, 29, 30, 29, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37
OFFSET
1,5
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
Sequence in context: A097357 A342016 A360923 * A370592 A151662 A049786
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 03 2006
STATUS
approved