login
A146208
a(n) is the number of arithmetic progressions of 2 or more integers with product = n.
2
4, 6, 6, 4, 10, 4, 11, 8, 10, 4, 12, 4, 8, 12, 12, 4, 12, 4, 12, 10, 8, 4, 26, 6, 8, 9, 14, 4, 16, 4, 13, 8, 8, 10, 20, 4, 8, 8, 20, 4, 18, 4, 12, 16, 8, 4, 26, 6, 12, 8, 12, 4, 16, 10, 16, 8, 8, 4, 26, 4, 8, 14, 19, 8, 18, 4, 12, 8, 16, 4, 24, 4, 8, 12
OFFSET
2,1
COMMENTS
a(n)=number of all integer triples (x,y,z) such that Product_{k=0..z} (x + (y*k)) = n, where n>1, z>0.
FORMULA
a(n) = A062011(n) + A361015(n). - Antti Karttunen, Feb 28 2023
EXAMPLE
a(8) = 11 as we can have
(x=-8,y=7,z=1; -8 * -1),
(x=-4,y=2,z=1; -4 * -2),
(x=-4,y=3,z=2; -4 * -1 * 2),
(x=-2,y=-2,z=1; -2 * -4),
(x=-1,y=-7,z=1; -1 * -8),
(x=1,y=7,z=1; 1 * 8),
(x=2,y=-3,z=2; 2 * -1 * -4),
(x=2,y=0,z=2; 2 * 2 * 2),
(x=2,y=2,z=1; 2 * 4),
(x=4,y=-2,z=1; 4 * 2),
(x=8,y=-7,z=1; 8 * 1). - Example added by Antti Karttunen, Feb 28 2023
a(9) = 8 as we can have
(x=-3,y=0,z=1; -3 * -3),
(x=3,y=0,z=1; 3 * 3),
(x=-9,y=8,z=1; -9 * -1),
(x=1,y=8,z=1; 1 * 9),
(x=-1,y=-8,z=1; -1 * -9),
(x=9,y=-8,z=1; 9 * 1),
(x=3,y=-2,z=3; 3 * 1 * -1 * -3),
(x=-3,y=2,z=3; -3 * -1 * 1 * 3).
PROG
(PARI) A146208(n) = sum(x=-n, n, sum(y=-n, n, sum(z=1, n, n==prod(k=0, z, x+(y*k))))); \\ (Slow!) - Antti Karttunen, Feb 28 2023
(Python)
from sympy import divisors
def A146208(n):
ds = divisors(n)
c, s = 0, [-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
Sequence in context: A201393 A327721 A327268 * A376426 A011227 A155907
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, Oct 28 2008
STATUS
approved