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 A238456 #19 May 05 2021 18:20:07 %S A238456 0,2211,5151,1107816,20959575,4237107540,1564279847151,61066162885575, %T A238456 2533192954461975,2774988107938203,90728963274006291, %U A238456 18765679728507154152720 %N A238456 Triangular numbers t such that t+x+y is a square, where x and y are the two squares nearest to t. %C A238456 For triangular numbers t such that t*x*y is a square, see A001110 (t is both triangular and square). %C A238456 a(13) > 5*10^22. - _Giovanni Resta_, Mar 02 2014 %e A238456 The two squares nearest to triangular(101)=5151 are 71^2 and 72^2. Because 5151 + 71^2 + 72^2 = 15376 is a perfect square, 5151 is in the sequence. %t A238456 sqQ[n_]:=Module[{c=Floor[Sqrt[n]]-1,x},x=Total[Take[SortBy[ Range[ c,c+3]^2, Abs[#-n]&],2]];IntegerQ[Sqrt[n+x]]]; Select[ Accumulate[ Range[ 0, 5000000]], sqQ] (* This will generate the first 7 terms of the sequence. To generate more, increase the second constant within the Range function, but computations will take a long time. *) (* _Harvey P. Dale_, May 12 2014 *) %o A238456 (Python) %o A238456 def isqrt(a): %o A238456 sr = 1 << (int.bit_length(int(a)) >> 1) %o A238456 while a < sr*sr: sr>>=1 %o A238456 b = sr>>1 %o A238456 while b: %o A238456 s = sr + b %o A238456 if a >= s*s: sr = s %o A238456 b>>=1 %o A238456 return sr %o A238456 t = i = 0 %o A238456 while 1: %o A238456 t += i %o A238456 i += 1 %o A238456 s = isqrt(t) %o A238456 if s*s==t: s-=1 %o A238456 txy = t + 2*s*(s+1) + 1 # t + s^2 + (s+1)^2 %o A238456 r = isqrt(txy) %o A238456 if r*r==txy: print(str(t), end=',') %Y A238456 Cf. A000217, A000290, A001110, A238489. %K A238456 nonn,hard,more %O A238456 1,2 %A A238456 _Alex Ratushnyak_, Feb 26 2014 %E A238456 a(12) from _Giovanni Resta_, Mar 02 2014