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 A340462 #19 Apr 30 2021 10:55:15 %S A340462 325,49141,104653,354061,3059101,24735061,33697945,72884701,406509841, %T A340462 408565405,1081752841,1690914781,3234130525,4521006505,4759123141, %U A340462 6432672025,10850633641,27812493325,33549177061,39343911841,49017527065,145684193005,157819451653,221156059645 %N A340462 Triangular numbers that are the hypotenuse of a primitive Pythagorean triple (PPT) such that another member of the triple is also triangular. %C A340462 A PPT is generated from the Euclid formula using parameters m, n where the hypotenuse is m^2+n^2, the odd leg is m^2-n^2 and the even leg is 2*m*n with m>n, m+n odd and GCD(m,n) = 1. For a triangular number to be the hypotenuse of a PPT it must be the sum of two squares and have all its prime factors congruent to 1 (mod 4). If a(n) is the k-th triangular number, then k is a member of A337156 such that the PPT has a second triangular number as either the odd or even leg. %C A340462 Conjecture: No PPT exists with all its members triangular numbers. %H A340462 Michel Marcus, <a href="/A340462/a340462_1.txt">Corresponding triples</a> %e A340462 a(1) = 325 because 325 is the 25th triangular number and has all its prime factors congruent to 1 (mod 4). It is the sum of two squares m^2 + n^2 where (m,n) = (1,18), (6,17), (10,15). The first and second pair can be used to generate two PPT's (325,323,36) and (325,253,204) and these PPT's contain a second triangular number 36 and 253 respectively. %t A340462 TriQ[n_] := Module[{m=Floor@Sqrt[2n]}, If[n==m(m+1)/2, True, False]]; flst[n_] := Module[{p, lst={}, p2=Ceiling@Sqrt[n/2], p1=1}, Do[If[IntegerQ[s=Sqrt[n-p^2]]&&s>0&&GCD[s, p]==1&&OddQ[s+p], AppendTo[lst, {p, s}]], {p, p1, p2}]; lst]; lst={}; Do[If[Union@Mod[First/@FactorInteger[p(p+1)/2], 4]=={1}, AppendTo[lst, Map[#[[1]]^2+#[[2]]^2 &, Select[flst[p(p+1)/2], TriQ[2#[[1]]*#[[2]]]||TriQ[#[[2]]^2-#[[1]]^2] &], 1]]], {p, 2, 10^4}]; Union@Flatten@lst %o A340462 (PARI) isokt(k) = my(f=factor(k)[, 1]~); for (i=1, #f, if ((f[i]%4) != 1, return (0))); return(1); \\ A337156 %o A340462 isok(h, n) = {if (ispolygonal(h, 3) && isokt(h), for (it=1, n-1, my(i=it*(it+1)/2, c); if (issquare(h^2-i^2, &c) && (gcd([i,c,h]) == 1), return (1););););} %o A340462 lista(nn) = {for (n=1, nn, my(t=n*(n+1)/2); if (isok(t, n), print1(t, ", ")););} \\ _Michel Marcus_, Apr 25 2021 %Y A340462 Cf. A337156. %K A340462 nonn %O A340462 1,1 %A A340462 _Frank M Jackson_, Jan 08 2021