OFFSET
2,1
COMMENTS
If p is prime, a(p) = p+1, a(p^2) = floor((p^3 + p^2 + p + 1)/2).
REFERENCES
Thread "100!" in rec.puzzles newsgroup, April 2007
LINKS
Robert Israel, Table of n, a(n) for n = 2..10000 (n=2..103 from Vincenzo Librandi)
EXAMPLE
a(3)=4 because (3^2)! = 362880 = 3^4 * 4480 and 4480 is not divisible by 3.
MAPLE
seq(ordp((n^2)!, n), n=2..50);
# Alternative:
f:= proc(n) local F, m, t, v, j;
F:= ifactors(n)[2];
m:= infinity;
for t in F do
v:= add(floor(n^2/t[1]^j), j=1..ceil(log[t[1]](n^2)));
m:= min(m, floor(v/t[2]));
od;
m
end proc:
map(f, [$2..100]); # Robert Israel, Feb 26 2019
MATHEMATICA
gkn[n_]:=Module[{c=(n^2)!, k}, k=Floor[Log[c]/Log[n]]; While[!Divisible[ c, n^k], k--]; k]; Array[gkn, 70, 2] (* Harvey P. Dale, Sep 14 2012 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Robert Israel, Apr 26 2007
STATUS
approved