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.

A345988 Smallest oblong number m*(m+1) that is divisible by n.

This page as a plain text file.
%I A345988 #14 Jul 10 2024 14:34:56
%S A345988 2,2,6,12,20,6,42,56,72,20,110,12,156,42,30,240,272,72,342,20,42,110,
%T A345988 506,72,600,156,702,56,812,30,930,992,132,272,210,72,1332,342,156,240,
%U A345988 1640,42,1806,132,90,506,2162,240,2352,600,306,156,2756,702,110,56,342,812,3422,240
%N A345988 Smallest oblong number m*(m+1) that is divisible by n.
%C A345988 Equals A344005(n)*(A344005(n)+1). See A344005 for much more about this problem.
%H A345988 Chai Wah Wu, <a href="/A345988/b345988.txt">Table of n, a(n) for n = 1..10000</a>
%t A345988 Module[{nn=60,ob},ob=Table[m(m+1),{m,nn}];Table[SelectFirst[ob,Mod[#,n]==0&],{n,nn}]] (* _Harvey P. Dale_, Jul 10 2024 *)
%o A345988 (Python 3.8+)
%o A345988 from itertools import combinations
%o A345988 from math import prod
%o A345988 from sympy import factorint
%o A345988 from sympy.ntheory.modular import crt
%o A345988 def A345988(n):
%o A345988     if n == 1:
%o A345988         return 2
%o A345988     plist = tuple(p**q for p, q in factorint(n).items())
%o A345988     return n*(n-1) if len(plist) == 1 else (s:= int(min(min(crt((m, n//m), (0, -1))[0], crt((n//m, m), (0, -1))[0]) for m in (prod(d) for l in range(1, len(plist)//2+1) for d in combinations(plist, l)))))*(s+1) # _Chai Wah Wu_, May 31 2022
%Y A345988 Cf. A002378, A344005.
%K A345988 nonn
%O A345988 1,1
%A A345988 _N. J. A. Sloane_, Jul 13 2021