OFFSET
2,2
COMMENTS
Number of all integer triples (x,y,z) such that Product_{k=0..z} (x + (y*k)) = n, where n > 1, z > 1.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 2..10000
EXAMPLE
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).
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).
a(27) = 1 as we have a unique solution (x=3,y=0,z=2; 3*3*3).
a(32) = 1 as we have a unique solution (x=2,y=0,z=4; 2*2*2*2*2).
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).
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).
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).
PROG
(PARI) A361015(n) = sum(x=-n, n, sum(y=-n, n, sum(z=2, n, n==prod(k=0, z, x+(y*k))))); \\ (Slow!)
(Python)
from sympy import divisors
def A361015(n):
ds = divisors(n)
c, s = -len(ds)<<1, [-d for d in ds[::-1]]+ds
for x in s:
d2 = [d//x for d in ds if d%x==0]
for y in (f-x for f in [-d for d in d2[::-1]]+d2):
m, k = x*(z:=x+y), 1
while n >= abs(m) and k<=n:
if n == m:
c += 1
z += y
m *= z
k += 1
return c # Chai Wah Wu, May 11 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 28 2023
STATUS
approved