login
A374840
a(n) is the greatest m > 0 such that the n-th row of Pascal's triangle (A007318) contains a multiple of k for k = 1..m.
1
1, 1, 2, 1, 4, 2, 6, 1, 2, 4, 10, 3, 12, 6, 4, 1, 16, 2, 18, 4, 6, 10, 22, 3, 4, 12, 2, 6, 28, 15, 30, 1, 10, 16, 6, 8, 36, 18, 12, 7, 40, 6, 42, 10, 8, 22, 46, 3, 6, 4, 16, 12, 52, 2, 10, 7, 18, 28, 58, 15, 60, 30, 8, 1, 12, 10, 66, 16, 22, 24, 70, 8, 72, 36
OFFSET
0,3
COMMENTS
The sequence A006093 appears to give the fixed points of this sequence.
LINKS
EXAMPLE
For n = 6: the sixth row of Pascal's triangle is 1, 6, 15, 20, 15, 6, 1; it contains a multiple of 1 (1), of 2 (6), of 3 (6), of 4 (20), of 5 (15), of 6 (6), but not of 7, so a(6) = 6.
MAPLE
A374840 := proc(n)
local dvsn , m, a;
if n = 0 then
return 1;
end if;
dvsn := {} ;
for m from 1 to (n+2)/2 do
binomial(n, m) ;
dvsn := dvsn union numtheory[divisors](%) ;
end do:
for a from 1 do
if not a in dvsn then
return a-1 ;
end if;
end do:
end proc:
seq(A374840(n), n=0..40) ; # R. J. Mathar, Jul 30 2024
# second Maple program:
a:= proc(n) local k, s; s:= {seq(binomial(n, k), k=0..n/2)};
for k while ormap(x-> irem(x, k)=0, s) do od: k-1
end:
seq(a(n), n=0..73); # Alois P. Heinz, Sep 04 2024
MATHEMATICA
a[n_] := If[n == 0, 1, Module[{dd, m, k}, dd = {}; For[m = 1, m <= (n + 2)/2, m++, dd = Union[dd, Divisors[Binomial[n, m]]]]; For[k = 1, True, k++, If[FreeQ[dd, k], Return[k - 1]]]]];
Table[a[n], {n, 0, 73}] (* Jean-François Alcover, Sep 04 2024, after R. J. Mathar *)
PROG
(PARI) a(n) = { my (b = binomial(n)[1..(n+2)\2]); for (m = 2, oo, ok = 0; for (i = 1, #b, if (b[i] % m==0, next(2); ); ); return (m-1); ); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jul 22 2024
STATUS
approved