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.

A165236 Short legs of primitive Pythagorean Triples (a,b,c) such that 2*a+1, 2*b+1 and 2*c+1 are primes.

Original entry on oeis.org

20, 33, 44, 56, 68, 273, 303, 320, 380, 440, 483, 740, 1071, 1089, 1101, 1220, 1376, 1484, 1635, 1773, 1808, 1869, 1940, 1965, 2000, 2120, 2144, 2204, 2319, 2715, 2763, 3003, 3164, 3309, 3500, 3603, 3729, 3740, 3753, 3801, 4148, 4215, 4323, 4340, 4401
Offset: 1

Views

Author

Keywords

Comments

Only one instance of a enters the sequence if multiple solutions exist, like with (a,b,c) = (320,999,1049) and (a,b,c) = (320,25599,25601).
Subsequence of A009004. [R. J. Mathar, Mar 25 2010]

Examples

			(a,b,c) = (20,21,29), (33,56,65), (44,483,485), (56,783,785), (68,285,293), (273,4136,4145).
In the first case, for example, 2*20+1=41, 2*21+1 and 2*29+1 are all prime, which adds the half-leg 20 to the sequence.
		

Crossrefs

Programs

  • Mathematica
    amax=6*10^4;lst={};k=0;q=12!;Do[If[(e=((n+1)^2-n^2))>amax,Break[]];
    Do[If[GCD[m, n]==1,a=m^2-n^2;If[PrimeQ[2*a+1],b=2*m*n;If[PrimeQ[2*b+1],If[GCD[a, b]==1,If[a>b,{a,b}={b,a}];If[a>amax,Break[]];
    c=m^2+n^2;If[PrimeQ[2*c+1], k++;AppendTo[lst,a]]]]]];If[a>amax,Break[]],{m,n+1,12!,2}],{n,1,q, 1}];Union@lst

Extensions

Comments moved to examples and definition clarified by R. J. Mathar, Mar 25 2010