OFFSET
0,3
LINKS
Robert Israel, Table of n, a(n) for n = 0..504
FORMULA
a(2n) = the largest power of 2 that divides (2n)!. a(2n+1) = the largest odd divisor of (2n+1)! = (2n+1)!/a(2n).
MAPLE
f:= proc(n, a)
local P, R, i;
P:= select(t -> isprime(t) and igcd(t, a)=1, [2, seq(i, i=3..n, 2)]);
R:= map(proc(p) local k; add(floor(n/p^k), k=1 ..ilog[p](n)) end proc, P);
mul(P[i]^R[i], i=1..nops(P));
end proc:
R:= 1: r:= 1: for i from 1 to 50 do r:= f(i, r); R:= R, r od:
R; # Robert Israel, Jul 21 2024
MATHEMATICA
a = {1}; For[n = 1, n < 25, n++, AppendTo[a, Select[Divisors[n! ], GCD[a[[ -1]], # ] == 1 &][[ -1]]]]; a (* Stefan Steinerberger, Dec 10 2007 *)
ldnf[{n_, a_}]:={n+1, Max[Select[Divisors[(n+1)!], CoprimeQ[#, a]&]]}; Transpose[ NestList[ldnf, {0, 1}, 30]][[2]] (* Harvey P. Dale, Jan 21 2016 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Dec 07 2007
EXTENSIONS
More terms from Stefan Steinerberger, Dec 10 2007
More terms from Robert Israel, Jul 21 2024
STATUS
approved