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-4 of 4 results.

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

A198390 Square root of third term of a triple of squares in arithmetic progression.

Original entry on oeis.org

7, 14, 17, 21, 23, 28, 31, 34, 35, 41, 42, 46, 47, 49, 49, 51, 56, 62, 63, 68, 69, 70, 71, 73, 77, 79, 82, 84, 85, 89, 91, 92, 93, 94, 97, 98, 98, 102, 103, 105, 112, 113, 115, 119, 119, 119, 119, 123, 124, 126, 127, 133, 136, 137, 138, 140, 141, 142, 146
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 24 2011

Keywords

Comments

There is a connection to the leg sums of Pythagorean triangles.
See a comment on the primitive case under A198439, which applies mutatis mutandis. - Wolfdieter Lang, May 23 2013
Are these just the positive multiples of A001132? - Charles R Greathouse IV, May 28 2013
n appears A331671(n) times. - Ray Chandler, Feb 26 2020

Examples

			Connection to leg sums of Pythagorean triangles: a(2) = 14 because (in the notation of the Zumkeller link) (u,v,w)= (2,10,14) = 2*(1,5,7), and this corresponds to the non-primitive Pythagorean triangle 2*(x=(7-1)/1,y=(1+7)/2,z=5) = 2*(3,4,5) with leg sum 2*(3+4) = 14. - _Wolfdieter Lang_, May 23 2013
		

Crossrefs

Programs

  • Haskell
    a198390 n = a198390_list !! (n-1)
    a198390_list = map (\(,,x) -> x) ts where
       ts = [(u,v,w) | w <- [1..], v <- [1..w-1], u <- [1..v-1],
                       w^2 - v^2 == v^2 - u^2]
    
  • 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]];
    Flatten[DeleteCases[triples /@ Range[wmax], {}], 2][[All, 3]] (* Jean-François Alcover, Oct 20 2021 *)
  • 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

Formula

A198386(n) = a(n)^2.
A198441(n) = a(A198409(n)).

A254064 Positive integers whose square is expressible in exactly one way as x^2 + 6xy + y^2, with 0 < x < y.

Original entry on oeis.org

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

Views

Author

Colin Barker, Jan 24 2015

Keywords

Comments

Equivalently positive integers whose square is expressible in exactly one way as -x^2 + 2xy + y^2 with 0 < x < y by replacing (x,y) with (2x,x+y). As such this sequence represents the sum of legs that are unique to a single Pythagorean triangle. - Ray Chandler, Feb 18 2020
n is in the sequence iff A331671(n)=1. - Ray Chandler, Feb 26 2020

Examples

			7 is in the sequence because the only solution to x^2 + 6xy + y^2 = 49 with 0 < x < y is (x,y) = (2,3).
		

Crossrefs

Programs

  • Mathematica
    s[n_] := Solve[0 < x < y && n^2 == x^2 + 6 x y + y^2, {x, y}, Integers];
    Reap[For[n = 1, n < 200, n++, If[Length[s[n]]==1, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Feb 13 2020 *)

A374061 Number of solutions to a^2 + n = 2 * b^2 with 0 < a < b.

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, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2
Offset: 1

Views

Author

Seiichi Manyama, Jun 27 2024

Keywords

Examples

			3^2 + 119 = 2 * 8^2 and 9^2 + 119 = 2 * 10^2. So a(119) = 2.
		

Crossrefs

Cf. A331671.
Showing 1-4 of 4 results.