%I #22 May 11 2023 23:39:21
%S 0,2,0,0,2,0,3,2,2,0,0,0,0,4,2,0,0,0,0,2,0,0,10,0,0,1,2,0,0,0,1,0,0,2,
%T 2,0,0,0,4,0,2,0,0,4,0,0,6,0,0,0,0,0,0,2,0,0,0,0,2,0,0,2,5,0,2,0,0,0,
%U 0,0,0,0,0,0,0,0,2,0,6,4,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,2,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20
%N Number of arithmetic progressions of 3 or more integers whose product is equal to n.
%C Number of all integer triples (x,y,z) such that Product_{k=0..z} (x + (y*k)) = n, where n > 1, z > 1.
%H Chai Wah Wu, <a href="/A361015/b361015.txt">Table of n, a(n) for n = 2..10000</a>
%F a(n) = A146208(n) - A062011(n).
%e a(3) = 2 as we have solutions (x=-3,y=2,z=2; -3 * -1 * 1) and (x=1,y=-2,z=2; 1 * -1 * -3).
%e a(8) = 3 as we have solutions (x=-4,y=3,z=2; -4 * -1 * 2), (x=2,y=-3,z=2; 2 * -1 * -4), and (x=2,y=0,z=2; 2*2*2).
%e a(27) = 1 as we have a unique solution (x=3,y=0,z=2; 3*3*3).
%e a(32) = 1 as we have a unique solution (x=2,y=0,z=4; 2*2*2*2*2).
%e a(64) = 5 as we have solutions (x=-8,y=6,z=2; -8 * -2 * 4), (x=-2,y=0,z=5; (-2)^6), (x=2,y=0,z=5; 2^6), (x=4,y=-6,z=2; 4 * -2 * -8), and (x=4,y=0,z=2; 4*4*4).
%e a(81) = 4 as we have solutions (x=-9,y=6,z=2; -9 * -3 * 3), (x=-3,y=0,z=3; -3 * -3 * -3 * -3), (x=3,y=-6,z=2; 3 * -3 * -9), and (x=3,y=0,z=3; 3*3*3*3).
%e a(300) = 2 as we have solutions (x=-25,y=13,z=2; -25 * -12 * 1) and (x=1,y=-13,z=2; 1 * -12 * -25).
%o (PARI) A361015(n) = sum(x=-n,n,sum(y=-n,n,sum(z=2,n,n==prod(k=0,z,x+(y*k))))); \\ (Slow!)
%o (Python)
%o from sympy import divisors
%o def A361015(n):
%o ds = divisors(n)
%o c, s = -len(ds)<<1, [-d for d in ds[::-1]]+ds
%o for x in s:
%o d2 = [d//x for d in ds if d%x==0]
%o for y in (f-x for f in [-d for d in d2[::-1]]+d2):
%o m, k = x*(z:=x+y), 1
%o while n >= abs(m) and k<=n:
%o if n == m:
%o c += 1
%o z += y
%o m *= z
%o k += 1
%o return c # _Chai Wah Wu_, May 11 2023
%Y Cf. A062011, A146208.
%K nonn
%O 2,2
%A _Antti Karttunen_, Feb 28 2023