OFFSET
1,3
COMMENTS
If p is the first prime > n/2, then a(n) > n-p. - Robert Israel, Jun 27 2018
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 01 2004
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Jul 03 2004
STATUS
approved