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.

Showing 1-7 of 7 results.

A198384 First of a triple of squares in arithmetic progression.

Original entry on oeis.org

1, 4, 49, 9, 49, 16, 289, 196, 25, 1, 36, 196, 529, 49, 961, 441, 64, 1156, 81, 784, 441, 100, 2401, 289, 121, 2209, 4, 144, 1225, 529, 169, 784, 2601, 2116, 5041, 196, 3844, 1764, 49, 225, 256, 1681, 1225, 289, 1681, 2401, 6241, 9, 4624, 324, 9409, 361
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 24 2011

Keywords

Programs

  • Haskell
    a198384 n = a198384_list !! (n-1)
    a198384_list = map (^ 2) a198388_list
  • Mathematica
    wmax = 1000;
    triples[w_] := Reap[Module[{u, v}, For[u = 1, u < w, u++, If[IntegerQ[v = Sqrt[(u^2 + w^2)/2]], Sow[{u^2, v^2, w^2}]]]]][[2]];
    Flatten[DeleteCases[triples /@ Range[wmax], {}], 2][[All, 1]] (* Jean-François Alcover, Oct 19 2021 *)

Formula

a(n) = A198388(n)^2.
A198385(n) - a(n) = A198386(n) - A198385(n) = A198387(n).
A198435(n) = a(A198409(n)).

Extensions

Thanks to Benoit Jubin, who had the idea for sequences A198384 .. A198390 and A198435 .. A198441.

A198409 Positions in sequences A198384, A198385 and A198386 to indicate triples of squares in arithmetic progression, that are not multiples of earlier triples.

Original entry on oeis.org

1, 3, 5, 7, 10, 13, 15, 23, 24, 26, 30, 35, 39, 42, 45, 47, 51, 54, 62, 69, 70, 72, 83, 84, 88, 97, 98, 102, 107, 114, 115, 124, 126, 129, 136, 141, 142, 143, 156, 157, 167, 169, 172, 177, 181, 188, 191, 201, 205, 208, 214, 218, 229, 230, 237, 244, 249, 253
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 25 2011

Keywords

Comments

A198435(n) = A198384(a(n)); A198439(n) = A198388(a(n));
A198436(n) = A198385(a(n)); A198440(n) = A198389(a(n));
A198437(n) = A198386(a(n)); A198441(n) = A198390(a(n));
A198438(n) = A198387(a(n)).

Programs

  • Haskell
    import Data.List (elemIndices)
    a198409 n = a198409_list !! (n-1)
    a198409_list = map (+ 1) $ elemIndices 1 $ map a008966 $
       zipWith gcd a198384_list $ zipWith gcd a198385_list a198386_list
  • Mathematica
    wmax = 1000;
    triples[w_] := Reap[Module[{u, v}, For[u = 1, u < w, u++, If[IntegerQ[v = Sqrt[(u^2 + w^2)/2]], Sow[{u^2, v^2, w^2}]]]]][[2]];
    tt = Flatten[DeleteCases[triples /@ Range[wmax], {}], 2];
    Position[tt, t_List /; SquareFreeQ[GCD@@t]] // Flatten (* Jean-François Alcover, Oct 24 2021 *)

Formula

A198386 Third of a triple of squares in arithmetic progression.

Original entry on oeis.org

49, 196, 289, 441, 529, 784, 961, 1156, 1225, 1681, 1764, 2116, 2209, 2401, 2401, 2601, 3136, 3844, 3969, 4624, 4761, 4900, 5041, 5329, 5929, 6241, 6724, 7056, 7225, 7921, 8281, 8464, 8649, 8836, 9409, 9604, 9604, 10404, 10609, 11025, 12544, 12769, 13225
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 24 2011

Keywords

Programs

  • Haskell
    a198386 n = a198386_list !! (n-1)
    a198386_list = map (^ 2) a198390_list
  • Mathematica
    wmax = 1000;
    triples[w_] := Reap[Module[{u, v}, For[u = 1, u < w, u++, If[IntegerQ[v = Sqrt[(u^2 + w^2)/2]], Sow[{u^2, v^2, w^2}]]]] ][[2]];
    Flatten[DeleteCases[triples /@ Range[wmax], {}], 2][[All, 3]] (* Jean-François Alcover, Oct 19 2021 *)

Formula

a(n) = A198390(n)^2.
a(n) - A198385(n) = A198385(n) - A198384(n) = A198387(n).
A198437(n) = a(A198409(n)).

A198441 Square root of third term of a triple of squares in arithmetic progression that is not a multiple of another triple in (A198384, A198385, A198386).

Original entry on oeis.org

7, 17, 23, 31, 41, 47, 49, 71, 73, 79, 89, 97, 103, 113, 119, 119, 127, 137, 151, 161, 161, 167, 191, 193, 199, 217, 217, 223, 233, 239, 241, 257, 263, 271, 281, 287, 287, 289, 311, 313, 329, 329, 337, 343, 353, 359, 367, 383, 391, 391, 401, 409, 431, 433
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 25 2011

Keywords

Comments

This sequence gives the sum of the two legs (catheti) x + y of primitive Pythagorean triangles (x,y,z) with y even and gcd(x,y) = 1, ordered nondecreasingly (with multiple entries). See A058529(n), n>=2, for the sequence without multiple entries. For the proof, put in the Zumkeller link w = x + y, v = z and u = abs(x - y). This works because w^2 - v^2 = v^2 - u^2, hence u^2 = 2*v^2 - w^2 = 2*z^2 - (x+y)^2 = 2*(x^2 + y^2) - (x+y)^2 = x^2 + y^2 - 2*x*y = (x-y)^2. The primitivity of the arithmetic progression triples follows from the one of the Pythagorean triples: gcd(u,w) = 1 follows from gcd(x,y) = 1, then gcd(u,v,w) = gcd(gcd(u,w),v) = 1. The converse can also be proved: given a primitive arithmetic progression triple (u,v,w), 1 <= u < v < w, gcd(u,v,w) = 1, the corresponding primitive Pythagorean triple with even y is ((w-u)/2,(w+u)/2,v) or ((w+u)/2,(w-u)/2,v), depending on whether (w+u)/2 is even or odd, respectively. - Wolfdieter Lang, May 22 2013
n appears A330174(n) times. - Ray Chandler, Feb 26 2020

Examples

			Primitive Pythagorean triangle connection: a(1) = 7 because (u,v,w) = (1,5,7) corresponds to the primitive Pythagorean triangle (x = (w-u)/2, y = (w+u)/2, z = v) = (3,4,5) with leg sum 3 + 4 = 7. - _Wolfdieter Lang_, May 23 2013
		

Crossrefs

Cf. A225949 (triangle version of leg sums).

Programs

  • Haskell
    a198441 n = a198441_list !! (n-1)
    a198441_list = map a198390 a198409_list
  • Mathematica
    wmax = 1000;
    triples[w_] := Reap[Module[{u, v}, For[u = 1, u < w, u++, If[IntegerQ[v = Sqrt[(u^2 + w^2)/2]], Sow[{u, v, w}]]]]][[2]];
    tt = Flatten[DeleteCases[triples /@ Range[wmax], {}], 2];
    DeleteCases[tt, t_List /; GCD@@t > 1 && MemberQ[tt, t/GCD@@t]][[All, 3]] (* Jean-François Alcover, Oct 22 2021 *)

Formula

A198437(n) = a(n)^2; a(n) = A198390(A198409(n)).

A120681 Sum of legs of primitive Pythagorean triangles sorted first on hypotenuse, then long leg.

Original entry on oeis.org

7, 17, 23, 31, 41, 47, 49, 73, 71, 89, 79, 103, 113, 97, 119, 137, 119, 151, 127, 161, 193, 167, 161, 191, 217, 239, 217, 199, 257, 233, 263, 223, 289, 271, 311, 241, 281, 313, 329, 287, 343, 287, 329, 367, 391, 401, 353, 431, 409, 337, 383, 457, 359, 463, 479
Offset: 1

Views

Author

Lekraj Beedassy, Jun 24 2006

Keywords

Comments

The prime numbers congruent to +1 or -1 modulo 8 of this sequence appear exactly once. For a proof see the W. Lang link under A001132. - Wolfdieter Lang, Feb 17 2015

Crossrefs

Programs

  • Mathematica
    A[s_Integer] := With[{s6 = StringPadLeft[ToString[s], 6, "0"]}, Cases[ Import["https://oeis.org/A" <> s6 <> "/b" <> s6 <> ".txt", "Table"], {, }][[All, 2]]];
    A046086 = A@046086;
    A046087 = A@046087;
    a[n_] := A046087[[n]] + A046086[[n]];
    a /@ Range[10000] (* Jean-François Alcover, Mar 07 2020 *)

Formula

a(n) = A046087(n) + A046086(n).

Extensions

Edited and corrected by Ray Chandler, Apr 10 2010

A118905 Sum of legs of Pythagorean triangles (without multiple entries).

Original entry on oeis.org

7, 14, 17, 21, 23, 28, 31, 34, 35, 41, 42, 46, 47, 49, 51, 56, 62, 63, 68, 69, 70, 71, 73, 77, 79, 82, 84, 85, 89, 91, 92, 93, 94, 97, 98, 102, 103, 105, 112, 113, 115, 119, 123, 124, 126, 127, 133, 136, 137, 138, 140, 141, 142, 146, 147, 151, 153, 154, 155, 158, 161, 164, 167, 168, 170, 175, 178, 182, 184, 186, 187, 188
Offset: 1

Views

Author

Giovanni Resta, May 05 2006

Keywords

Comments

The prime numbers in this sequence define A001132 (see comment in A001132). - Richard Choulet, Dec 16 2008
For the sum of legs of Pythagorean triangles with multiple entries see A198390. - Wolfdieter Lang, May 24 2013
Are these just the positive multiples of A001132? - Charles R Greathouse IV, May 28 2013
For the sum of legs of primitive Pythagorean triangles see A120681. - Wolfdieter Lang, Feb 17 2015
n is in the sequence iff A331671(n) > 0. - Ray Chandler, Feb 26 2020

Examples

			7 = 3 + 4 and 3^2 + 4^2 = 5^2.
a(14) = 49 = 7^2 from the primitive Pythagorean triangle (x,y,z) = (9,40,41), and from the non-primitive one 7*(3,4,5); a(42) = 119 = 7*17 from four Pythagorean triangles (39,80,89) and (99,20,181) (both primitive) and 7*(5,12,13), 17*(3,4,5). - _Wolfdieter Lang_, May 24 2013
		

Crossrefs

Programs

  • Magma
    [m:m in [2..200]|#[k:k in [1..m-1]|IsSquare(k^2+(m-k)^2)] ne 0]; // Marius A. Burtea, Jul 29 2019
  • PARI
    is(n)=my(t=n^2); forstep(i=2-n%2, n-2, 2, if(issquare((t+i^2)/2), return(1))); 0 \\ Charles R Greathouse IV, May 28 2013
    

Extensions

More terms from 147 on. - Richard Choulet, Nov 24 2009
Name specified. - Wolfdieter Lang, May 24 2013

A331671 Number of Pythagorean triangles with sum of legs n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 2, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 2, 0, 0, 0, 1
Offset: 1

Views

Author

Ray Chandler, Feb 26 2020

Keywords

Crossrefs

Showing 1-7 of 7 results.