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.
%I A080982 #21 Jun 13 2021 22:15:22 %S A080982 1,7,8,31,24,8,48,127,80,24,120,63,168,48,99,511,288,80,360,224,98, %T A080982 120,528,512,624,168,728,735,840,224,960,2047,242,288,49,1215,1368, %U A080982 360,675,1024,1680,440,1848,1088,324,528,2208,512,2400,624,288,1183,2808,728 %N A080982 Smallest k such that the k-th triangular number has n^2 as divisor. %H A080982 Chai Wah Wu, <a href="/A080982/b080982.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Reinhard Zumkeller) %F A080982 a(2^k) = 2^(2*k+1) - 1. %F A080982 a(m) = m^2 - 1 for odd prime powers m. %F A080982 A080983(n) = A000217(a(n)). %o A080982 (Haskell) %o A080982 import Data.List (findIndex) %o A080982 import Data.Maybe (fromJust) %o A080982 a080982 n = (+ 1) $ fromJust $ %o A080982 findIndex ((== 0) . (`mod` (n ^ 2))) $ tail a000217_list %o A080982 -- _Reinhard Zumkeller_, Mar 23 2013 %o A080982 (Python 3.8+) %o A080982 from itertools import combinations %o A080982 from sympy import factorint %o A080982 from sympy.ntheory.modular import crt %o A080982 def A080982(n): %o A080982 k = 2*n**2 %o A080982 plist = [p**q for p, q in factorint(k).items()] %o A080982 return k-1 if len(plist) == 1 else min(min(crt([m,k//m],[0,-1])[0],crt([k//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))) # _Chai Wah Wu_, Jun 13 2021 %Y A080982 Cf. A000217, A011772, A080983. %K A080982 nonn %O A080982 1,2 %A A080982 _Reinhard Zumkeller_, Feb 26 2003