login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A345988
Smallest oblong number m*(m+1) that is divisible by n.
3
2, 2, 6, 12, 20, 6, 42, 56, 72, 20, 110, 12, 156, 42, 30, 240, 272, 72, 342, 20, 42, 110, 506, 72, 600, 156, 702, 56, 812, 30, 930, 992, 132, 272, 210, 72, 1332, 342, 156, 240, 1640, 42, 1806, 132, 90, 506, 2162, 240, 2352, 600, 306, 156, 2756, 702, 110, 56, 342, 812, 3422, 240
OFFSET
1,1
COMMENTS
Equals A344005(n)*(A344005(n)+1). See A344005 for much more about this problem.
MATHEMATICA
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 *)
PROG
(Python 3.8+)
from itertools import combinations
from math import prod
from sympy import factorint
from sympy.ntheory.modular import crt
def A345988(n):
if n == 1:
return 2
plist = tuple(p**q for p, q in factorint(n).items())
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
CROSSREFS
Sequence in context: A361426 A157285 A320068 * A275439 A173392 A324128
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 13 2021
STATUS
approved