OFFSET
1,6
LINKS
Robin Visser, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = max_{j=1..n} binomial(n,j) mod j.
EXAMPLE
n=13: {binomial(13,j) mod j, j=1..13} = {0,0,1,3,2,0,1,7,4,6,1,1,1}; maximum is 7, so a(13) = 7.
MATHEMATICA
Table[Max[Table[Mod[Binomial[n, j], j], {j, 1, n}]], {n, 1, 256]
PROG
(PARI) a(n) = vecmax(vector(n, j, binomial(n, j) % j)); \\ Michel Marcus, Jul 29 2017
(Sage) def a(n):
return max([binomial(n, j)%j for j in range(1, n+1)]) # Robin Visser, Nov 26 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Mar 21 2003
STATUS
approved