OFFSET
1,4
COMMENTS
For maximal value x such that x^2 - y^2 = n! see A139151, for maximal value y such that x^2 - y^2 = n! see A181892. - Artur Jasinski, Mar 31 2012
LINKS
Sudipta Mallick, Table of n, a(n) for n = 1..1000
FORMULA
For n >= 4, if p_i is the i-th prime, with p_k the largest prime not exceeding n and n!/4 = (p_1^e_1)*(p_2^e_2)* ... *(p_k^e_k), then a(n) = (1/2)*(e_1+1)*(e_2_+1)* ... *(e_k+1).
EXAMPLE
a(5)=4 since 5! = 120 = 31^2 - 29^2 = 17^2 - 13^2 = 13^2 - 7^2 = 11^2 - 1^2.
MAPLE
A138196 := proc(n)
if n <= 3 then
op(n, [1, 0, 0]) ;
else
numtheory[tau](n!/4)/2 ;
end if;
end proc: # R. J. Mathar, Apr 03 2012
MATHEMATICA
(* for n>=4 *) cc = {}; Do[w = n!/4; kk = Floor[(DivisorSigma[0, w] + 1)/2]; AppendTo[cc, kk], {n, 4, 54}]; cc (* Artur Jasinski, Mar 31 2012 *)
PROG
(PARI) a(n) = if (n<4, (n==1), numdiv(n!/4)/2); \\ Michel Marcus, Jun 22 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
John T. Robinson (jrobinson(AT)acm.org), May 04 2008
STATUS
approved