login
A080216
a(n) is the largest value taken by binomial(n,j) mod j for j in [1..n].
2
0, 1, 1, 1, 1, 3, 3, 4, 2, 5, 5, 7, 7, 7, 11, 8, 8, 9, 9, 13, 16, 11, 11, 15, 15, 13, 21, 18, 18, 18, 18, 18, 26, 26, 21, 25, 25, 21, 31, 28, 28, 29, 29, 31, 39, 27, 27, 36, 34, 31, 41, 34, 34, 45, 45, 36, 46, 46, 46, 43, 43, 41, 51, 40, 48, 52, 52, 52, 56, 44, 44, 52, 52, 57, 61
OFFSET
1,6
LINKS
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