login
A096125
Least value of k such that n!/((n-k)!)^2 is an integer.
2
1, 1, 2, 2, 3, 3, 4, 4, 5, 4, 5, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 13, 14, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 26, 27, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38
OFFSET
1,3
COMMENTS
If p is the first prime > n/2, then a(n) > n-p. - Robert Israel, Jun 27 2018
LINKS
EXAMPLE
a(10) = 4.
MAPLE
f:= proc(n) local p, k;
p:= nextprime(floor(n/2));
for k from n-p+1 do
if (n!/((n-k)!)^2)::integer then return k fi
od
end proc:
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Jun 27 2018
MATHEMATICA
f[n_] := Block[{i = 1, t = Table[n!/(n - k)!^2, {k, n}]}, While[ !IntegerQ[ t[[i]]], i++ ]; i]; Table[ f[n], {n, 75}] (* Robert G. Wilson v, Jul 03 2004 *)
CROSSREFS
Sequence in context: A319468 A137791 A351834 * A140828 A262907 A341721
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 01 2004
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Jul 03 2004
STATUS
approved