login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A345988 Smallest oblong number m*(m+1) that is divisible by n. 3

%I #10 May 31 2022 12:46:13

%S 2,2,6,12,20,6,42,56,72,20,110,12,156,42,30,240,272,72,342,20,42,110,

%T 506,72,600,156,702,56,812,30,930,992,132,272,210,72,1332,342,156,240,

%U 1640,42,1806,132,90,506,2162,240,2352,600,306,156,2756,702,110,56,342,812,3422,240

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

%C Equals A344005(n)*(A344005(n)+1). See A344005 for much more about this problem.

%H Chai Wah Wu, <a href="/A345988/b345988.txt">Table of n, a(n) for n = 1..10000</a>

%o (Python 3.8+)

%o from itertools import combinations

%o from math import prod

%o from sympy import factorint

%o from sympy.ntheory.modular import crt

%o def A345988(n):

%o if n == 1:

%o return 2

%o plist = tuple(p**q for p, q in factorint(n).items())

%o 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 Cf. A002378, A344005.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Jul 13 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)