A171919 Number of solutions to n=x*y*z, x+y-z=1 with ordered triples (x,y,z), x,y,z>=1.
1, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2
Offset: 1
Keywords
Examples
For n=4, the a(4)=2 solutions are (x,y,z)=(1,2,2) and (2,1,2). For n=12, the a(12)=1 solution is (x,y,z)=(2,2,3).
Links
- Antti Karttunen, Table of n, a(n) for n = 1..28224
Programs
-
Maple
A := proc(n) local a,dvs,x,y,z,dvsyz; a :=0 ; dvs := numtheory[divisors](n) ; for x in dvs do yz := n/x ; dvsyz := numtheory[divisors](yz) ; for y in dvsyz do z := yz/y ; if x+y-z=1 then a := a+1 ; fi; end do; end do: return a; end proc: seq(A(n),n=1..100) ; # R. J. Mathar, Oct 23 2010
-
Mathematica
f[n_] := Block[{c = 0, cong = {0, 1, 4, 9, 12, 16, 21, 24, 25, 36, 37, 40, 45, 49, 52, 57}, dvs = Divisors@ n, dvt, j = 1, k, lmt1, lmt2}, If[ MemberQ[ cong, Mod[n, 60]], lmtj = Length@ dvs + 1; While[j < lmtj, dvt = Divisors[ n/dvs[[j]]]; k = 1; lmtk = Length@ dvt + 1; While[k < lmtk, If[ dvs[[j]] + dvt[[k]] == n/(dvs[[j]]*dvt[[k]]) + 1, c++ ]; k++ ]; j++ ]]; c]; Array[f, 105] (* Robert G. Wilson v, Oct 24 2010 *)
-
PARI
A171919(n)={ my(c=0,t); fordiv(n, z, fordiv( t=n/z, y, y>z & break; y*(z+1-y)==t & c++) ); c} /* can be improved by restricting to x<=y and counting twice if x
M. F. Hasler, Oct 23 2010
Extensions
Some more values from M. F. Hasler, Oct 23 2010
Comments