[go: up one dir, main page]

login
a(n) is the number of arithmetic progressions of 2 or more integers with product = n.
2

%I #16 May 12 2023 05:40:14

%S 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,

%T 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,

%U 8,8,4,26,4,8,14,19,8,18,4,12,8,16,4,24,4,8,12

%N a(n) is the number of arithmetic progressions of 2 or more integers with product = n.

%C 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.

%H Chai Wah Wu, <a href="/A146208/b146208.txt">Table of n, a(n) for n = 2..10000</a>

%F a(n) = A062011(n) + A361015(n). - _Antti Karttunen_, Feb 28 2023

%e a(8) = 11 as we can have

%e (x=-8,y=7,z=1; -8 * -1),

%e (x=-4,y=2,z=1; -4 * -2),

%e (x=-4,y=3,z=2; -4 * -1 * 2),

%e (x=-2,y=-2,z=1; -2 * -4),

%e (x=-1,y=-7,z=1; -1 * -8),

%e (x=1,y=7,z=1; 1 * 8),

%e (x=2,y=-3,z=2; 2 * -1 * -4),

%e (x=2,y=0,z=2; 2 * 2 * 2),

%e (x=2,y=2,z=1; 2 * 4),

%e (x=4,y=-2,z=1; 4 * 2),

%e (x=8,y=-7,z=1; 8 * 1). - Example added by _Antti Karttunen_, Feb 28 2023

%e a(9) = 8 as we can have

%e (x=-3,y=0,z=1; -3 * -3),

%e (x=3,y=0,z=1; 3 * 3),

%e (x=-9,y=8,z=1; -9 * -1),

%e (x=1,y=8,z=1; 1 * 9),

%e (x=-1,y=-8,z=1; -1 * -9),

%e (x=9,y=-8,z=1; 9 * 1),

%e (x=3,y=-2,z=3; 3 * 1 * -1 * -3),

%e (x=-3,y=2,z=3; -3 * -1 * 1 * 3).

%o (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

%o (Python)

%o from sympy import divisors

%o def A146208(n):

%o ds = divisors(n)

%o c, s = 0, [-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, A361015.

%K easy,nonn

%O 2,1

%A _Naohiro Nomoto_, Oct 28 2008