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.

A245647 The middle member 'b' 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 A245647 #15 Aug 21 2014 22:45:59
%S A245647 4,12,105,2625
%N A245647 The middle member 'b' 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 A245647 Next term comes from a triple with c > 10^5.
%e A245647 a(1) = 4 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 A245647 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,{2,-1,3}](*Finds the terms through a search within all Pythagorean triples with c <= n*)
%Y A245647 Cf. A000217, A000290, A000326, A245646, A245648.
%K A245647 nonn,more,hard
%O A245647 1,1
%A A245647 _Ivan N. Ianakiev_, Jul 28 2014