cp's OEIS Frontend

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.

A245646 The smallest member 'a' of the Pythagorean triples (a,b,c) ordered by increasing c, where the triples consist of a triangular number, a square number and a pentagonal number.

This page as a plain text file.
%I A245646 #20 Dec 23 2023 10:56:51
%S A245646 3,9,100,900
%N A245646 The smallest member 'a' of the Pythagorean triples (a,b,c) ordered by increasing c, where the triples consist of a triangular number, a square number and a pentagonal number.
%C A245646 The next term (if it exists) comes from a triple with c > 10^5.
%e A245646 a(1) = 3 as the first such Pythagorean triple is (3,4,5). The next three triples are (9,12,15), (100,105,145), (900,2625,2775).
%t A245646 n=10^3;ppt={};list={};pos=1;t[x_]:=(IntegerPart[Sqrt[2*x]])*(IntegerPart[Sqrt[2*x]]+1)/2;ls[x_]:=Length[Sqrt[x]];lis[x_]:=Length[IntegerPart[Sqrt[x]]];lp[x_]:=Length[(Sqrt[24*x+1]+1)/6];lip[x_]:=Length[IntegerPart[(Sqrt[24*x+1]+1)/6]];Do[y=x+1;z=y+1;While[z<=n,While[z^2<x^2+y^2,z=z+1];If[z^2==x^2+y^2,AppendTo[ppt,{x,y,z}]];y=y+1],{x,1,n}];While[pos<Length[ppt]+1,a=ppt[[pos,1]];b=ppt[[pos,2]];c=ppt[[pos,3]];If[Or[And[t[a]==a,ls[b]==lis[b],lp[c]==lip[c]],And[t[a]==a,ls[c]==lis[c],lp[b]==lip[b]],And[t[b]==b,ls[a]==lis[a],lp[c]==lip[c]],And[t[b]==b,ls[c]==lis[c],lp[a]==lip[a]],And[t[c]==c,ls[a]==lis[a],lp[b]==lip[b]],And[t[c]==c,ls[b]==lis[b],lp[a]==lip[a]]],AppendTo[list,{a,b,c}]];pos++];l=Flatten[Sort[list,#1[[3]]<#2[[3]]&]];Take[l,{1,-1,3}](*Finds the terms through a search within all Pythagorean triples with c <= n*)
%Y A245646 Cf. A000217, A000290, A000326, A245647, A245648
%K A245646 nonn,more,hard
%O A245646 1,1
%A A245646 _Ivan N. Ianakiev_, Jul 28 2014