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 A068776 #13 May 06 2024 11:03:51 %S A068776 1,3,6,36,2016,1493856,579616128,11013286048128, %T A068776 1004811205553955491328,1897191992473259952000123882626029056, %U A068776 5012064437680248664058937311304485563631765718940918773832320000 %N A068776 a(0) = 1; for n > 0, a(n) is the smallest triangular number which is a (proper) multiple of a(n-1). %H A068776 Chai Wah Wu, <a href="/A068776/b068776.txt">Table of n, a(n) for n = 0..13</a> %e A068776 a(2) = 6, since 6 = 2*a(1) and 6 is a triangular number. %t A068776 pm1[{k_}] := {1, k-1}; pm1[lst_] := Module[{a, m, v}, a=lst[[1]]; m=Times@@Rest[lst]; v=pm1[Rest[lst]]; Union[ChineseRemainder[{1, #}, {a, m}]&/@v, ChineseRemainder[{-1, #}, {a, m}]&/@v]]; nexttri[1]=3; nexttri[n_] := Module[{s}, s=(pm1[Power@@#&/@FactorInteger[4n]]^2-1)/8; For[i=1, True, i++, If[s[[i]]>n, Return[s[[i]]]]]]; a[0]=1; a[n_] := a[n]=nexttri[a[n-1]]; (* First do <<NumberTheory`NumberTheoryFunctions`. If lst is a list of relatively prime integers >= 3, pm1[lst] is the list of numbers less than their product and == 1 or -1 (mod every element of lst). nexttri[n] is the smallest triangular number >n and divisible by n. *) %o A068776 (PARI) {a068776(m)=local(k,q,n); k=1; q=k*(k+1)/2; while(q<m,n=q; print1(n,","); k++; q=q+k; while(q<m&&q%n>0,k++; q=q+k))} %o A068776 (Python) %o A068776 from itertools import islice %o A068776 from sympy import sqrt_mod_iter %o A068776 def A068776_gen(): # generator of terms %o A068776 a = 8 %o A068776 while True: %o A068776 yield a>>3 %o A068776 b = a+1 %o A068776 for d in sqrt_mod_iter(1,a): %o A068776 if d==1 or d**2-1 == a: %o A068776 d += a %o A068776 if d&1 and d < b: %o A068776 b = d %o A068776 a = b**2-1 %o A068776 A068776_list = list(islice(A068776_gen(),12)) # _Chai Wah Wu_, May 05 2024 %Y A068776 Cf. A000217, A068142. %K A068776 nonn %O A068776 0,2 %A A068776 _Klaus Brockhaus_, Mar 01 2002 %E A068776 Edited by _Dean Hickerson_, Mar 09 2002