OFFSET
0,10
LINKS
Project Euler, Problem 598: Split Divisibilities
EXAMPLE
For n = 9, there are 5 pairs (a,b): (384,945), (420,864), (480,756), (540,672), (560,648)
MAPLE
a:=proc(n) local S, nf, DD, d, dd:with(numtheory): S:=0:nf:=n!:DD:=divisors(nf):dd:=floor(sqrt(nf)): for d in DD while d <dd do if tau(d)=tau(nf/d) then S:=S +1 end if: end do: S end proc: # only for small n # Leonid Bedratyuk, Apr 16 2017
MATHEMATICA
a[n_] := Length@ Select[ Divisors[n!], # <= n!/# && Equal @@ DivisorSigma[0, {#, n!/#}] &]; a /@ Range[0, 20] (* Giovanni Resta, Apr 11 2017 *)
PROG
(PARI) a(n)=my(c=0); fordiv(n!, a, my(b=n!/a); if(a>b, break); if( numdiv(a) == numdiv(b), c++)); c
CROSSREFS
KEYWORD
nonn
AUTHOR
M. Sinan Kul, Apr 11 2017
EXTENSIONS
a(26)-a(50) from Giovanni Resta, Apr 11 2017
STATUS
approved