cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A146208 #16 May 12 2023 05:40:14
%S A146208 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 A146208 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 A146208 8,8,4,26,4,8,14,19,8,18,4,12,8,16,4,24,4,8,12
%N A146208 a(n) is the number of arithmetic progressions of 2 or more integers with product = n.
%C A146208 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 A146208 Chai Wah Wu, <a href="/A146208/b146208.txt">Table of n, a(n) for n = 2..10000</a>
%F A146208 a(n) = A062011(n) + A361015(n). - _Antti Karttunen_, Feb 28 2023
%e A146208 a(8) = 11 as we can have
%e A146208  (x=-8,y=7,z=1; -8 * -1),
%e A146208  (x=-4,y=2,z=1; -4 * -2),
%e A146208  (x=-4,y=3,z=2; -4 * -1 * 2),
%e A146208  (x=-2,y=-2,z=1; -2 * -4),
%e A146208  (x=-1,y=-7,z=1; -1 * -8),
%e A146208  (x=1,y=7,z=1; 1 * 8),
%e A146208  (x=2,y=-3,z=2; 2 * -1 * -4),
%e A146208  (x=2,y=0,z=2; 2 * 2 * 2),
%e A146208  (x=2,y=2,z=1; 2 * 4),
%e A146208  (x=4,y=-2,z=1; 4 * 2),
%e A146208  (x=8,y=-7,z=1; 8 * 1). - Example added by _Antti Karttunen_, Feb 28 2023
%e A146208 a(9) = 8 as we can have
%e A146208  (x=-3,y=0,z=1; -3 * -3),
%e A146208  (x=3,y=0,z=1; 3 * 3),
%e A146208  (x=-9,y=8,z=1; -9 * -1),
%e A146208  (x=1,y=8,z=1; 1 * 9),
%e A146208  (x=-1,y=-8,z=1; -1 * -9),
%e A146208  (x=9,y=-8,z=1; 9 * 1),
%e A146208  (x=3,y=-2,z=3; 3 * 1 * -1 * -3),
%e A146208  (x=-3,y=2,z=3; -3 * -1 * 1 * 3).
%o A146208 (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 A146208 (Python)
%o A146208 from sympy import divisors
%o A146208 def A146208(n):
%o A146208     ds = divisors(n)
%o A146208     c, s = 0, [-d for d in ds[::-1]]+ds
%o A146208     for x in s:
%o A146208         d2 = [d//x for d in ds if d%x==0]
%o A146208         for y in (f-x for f in [-d for d in d2[::-1]]+d2):
%o A146208             m, k = x*(z:=x+y), 1
%o A146208             while n >= abs(m) and k<=n:
%o A146208                 if n == m:
%o A146208                     c += 1
%o A146208                 z += y
%o A146208                 m *= z
%o A146208                 k += 1
%o A146208     return c # _Chai Wah Wu_, May 11 2023
%Y A146208 Cf. A062011, A361015.
%K A146208 easy,nonn
%O A146208 2,1
%A A146208 _Naohiro Nomoto_, Oct 28 2008