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 A179682 #23 Mar 13 2023 12:13:26 %S A179682 1,8,24,48,80,120,168,224,49,360,440,528,624,728,840,960,1088,1224, %T A179682 1368,1520,1680,1848,2024,2208,242,2600,2808,3024,3248,3480,3720,3968, %U A179682 4224,4488,4760,5040,5328,5624,5928,6240,6560,6888,7224,7568,7920,8280,8648 %N A179682 Least integer, k, greater than n such that t(k)*t(n) form a perfect square; t(i) is the i-th triangular number (A000217). %C A179682 It appears that a(n) = A033996(n) for most n. - _Robert Israel_, Feb 15 2019 %H A179682 Robert Israel, <a href="/A179682/b179682.txt">Table of n, a(n) for n = 0..2000</a> %F A179682 From _Robert Israel_, Feb 15 2019: (Start) %F A179682 a(n) <= A033996(n). %F A179682 If n = A033996(j) then a(n) <= A033996(a(j)). %F A179682 If n = a(j) < A033996(j) then a(n) <= A033996(j). %F A179682 (End) %p A179682 f:= proc(n) local F,t,p,k0,d,k,a,j; %p A179682 p:= max(map(t -> `if`(t[2]::odd, t[1],NULL), [op(ifactors(n)[2]),op(ifactors(n+1)[2])])); %p A179682 if n mod p = 0 then k0:= n+p-1; d:= 1; %p A179682 else k0:= n+1; d:= p-1; %p A179682 fi; %p A179682 t:= n*(n+1)/4; %p A179682 for a from k0 by p do %p A179682 for k in [a, a+d] do %p A179682 if issqr(k*(k+1)*t) then return k fi %p A179682 od od %p A179682 end proc: %p A179682 f(0):= 1: %p A179682 map(f, [$0..100]); # _Robert Israel_, Feb 15 2019 %t A179682 f[n_] := Block[{k = n + 1, n2 = n (n + 1)/2}, While[ !IntegerQ@ Sqrt[n2*k (k + 1)/2], k++ ]; k]; Array[f, 47, 0] %o A179682 (Python) %o A179682 from sympy.ntheory.primetest import is_square %o A179682 def A179682(n): %o A179682 m = n*(n+1)>>1 %o A179682 k = n+1 %o A179682 while not is_square(m*k*(k+1)>>1): %o A179682 k += 1 %o A179682 return k # _Chai Wah Wu_, Mar 13 2023 %Y A179682 Cf. A000217, A033996, A175497, A306415. %K A179682 nonn,look %O A179682 0,2 %A A179682 _Robert G. Wilson v_, Jul 24 2010 %E A179682 Incorrect empirical g.f. removed by _Robert Israel_, Feb 15 2019