login
A110808
Least factorial obtained as n*(n-1)*...*(n-k).
1
1, 2, 6, 24, 120, 6, 5040, 40320, 362880, 720, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000, 51090942171709440000, 1124000727777607680000, 25852016738884976640000, 24
OFFSET
1,2
COMMENTS
a(10) = 720, so 10 is a number k such that a(k) is neither k! nor k. Is 10 the only such number?
FORMULA
a(n) <= n!; a(m!) = m!.
EXAMPLE
a(10) = 10*9*8 = 720.
a(6) = 6.
MAPLE
isfact := proc(n) local i ; for i from 1 do if i! = n then RETURN(true) ; elif i! > n then RETURN(false) ; fi ; od; end: A110808 := proc(n) local k, nfall ; for k from 0 do nfall := mul(n-i, i=0..k) ; if isfact(nfall) then RETURN(nfall) ; fi ; od: end: seq(A110808(n), n=1..40) ; # R. J. Mathar, Feb 08 2008
MATHEMATICA
isfact[n_] := Module[{i}, For[i = 1, True, i++, If[i! == n, Return[True], If[i! > n, Return[False]]]]];
a[n_] := Module[{k, nfall}, For[k = 0, True, k++, nfall = Product[n - i, {i, 0, k}]; If[isfact[nfall], Return[nfall]]]];
Table[a[n], {n, 1, 20}] (* Jean-François Alcover, May 20 2024, after R. J. Mathar *)
PROG
(PARI) isf(p) = my(f=1); for(k=1, oo, f *= k; if (f==p, return(1)); if (f>p, return(0)); );
a(n) = my(p=n); for (k=1, n, if (isf(p), return(p)); p *= (n-k); ); \\ Michel Marcus, May 20 2024
CROSSREFS
Cf. A000142.
Sequence in context: A358611 A362332 A092495 * A369407 A284567 A360300
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 14 2005
EXTENSIONS
More terms from R. J. Mathar, Feb 08 2008
More terms from Michel Marcus, May 20 2024
STATUS
approved