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.

Previous Showing 11-20 of 32 results. Next

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)).

A120682 Difference between legs of primitive Pythagorean triangles sorted first on hypotenuse, then long leg.

Original entry on oeis.org

1, 7, 7, 17, 1, 23, 31, 17, 49, 23, 47, 7, 41, 71, 41, 7, 79, 31, 97, 73, 17, 119, 127, 89, 47, 1, 113, 161, 49, 119, 73, 167, 23, 103, 31, 199, 161, 103, 89, 223, 151, 241, 191, 137, 71, 79, 217, 17, 137, 287, 233, 49, 287, 113, 119, 47, 281, 337, 23, 193, 217, 151, 97
Offset: 1

Views

Author

Lekraj Beedassy, Jun 24 2006

Keywords

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) = A118962(n) - A118961(n).

Extensions

Edited and extended by Ray Chandler, Apr 10 2010

A225949 Triangle for sum of the two legs (catheti) of primitive Pythagorean triangles.

Original entry on oeis.org

7, 0, 17, 23, 0, 31, 0, 41, 0, 49, 47, 0, 0, 0, 71, 0, 73, 0, 89, 0, 97, 79, 0, 103, 0, 119, 0, 127, 0, 113, 0, 137, 0, 0, 0, 161, 119, 0, 151, 0, 0, 0, 191, 0, 199, 0, 161, 0, 193, 0, 217, 0, 233, 0, 241, 167, 0, 0, 0, 239, 0, 263, 0, 0, 0, 287, 0, 217, 0, 257, 0, 289, 0, 313, 0, 329, 0, 337, 223, 0, 271, 0, 311, 0, 0, 0, 367, 0, 383, 0, 391
Offset: 2

Views

Author

Wolfdieter Lang, May 21 2013

Keywords

Comments

For primitive Pythagorean triples (x,y,z) see the Niven et al. reference, Theorem 5.5, p. 232, and the Hardy-Wright reference, Theorem 225, p. 190.
Here a(n,m) = 0 for non-primitive Pythagorean triangles.
There is a one-to-one correspondence between the values n and m of this number triangle for which a(n,m) does not vanish and primitive solutions of x^2 + y^2 = z^2 with y even, namely x = n^2 - m^2, y = 2*n*m and z = n^2 + m^2. The mirror triangles with x even are not considered here. Therefore a(n,m) = n^2 - m^2 + 2*n*m (for these solutions).
The number of non-vanishing entries in row n is A055034(n).
The sequence of the main diagonal is 2*n^2-1 = A056220(n), n>= 2.
The sequence of the main diagonal is j^2 + k^2 - 2 or 2*j*k if n>=2 and j = n + sqrt(2)/2 and k = n - sqrt(2)/2. - Avi Friedlich, Mar 30 2015
If the 0 entries are eliminated and the numbers are ordered increasingly (keeping multiple entries) the sequence becomes A198441(n-1), n>=2. If multiple entries are recorded only once this becomes A058529 (a proper subsequence of A118905). Note that all leg sums <= N are certainly reached if one considers rows n = 2, ..., floor(-1 + sqrt(N+2)).
a(n, m) also gives twice the member t(n, m) of the triple (r(n, m), s(n, m), t(n, m)) with squares r(n, m)^2, s(n, m)^2 and t(n, m)^2 in arithmetic progression with common difference A(n, m) = A249869(n, m), the area of the primitive Pythagorean triangle, or 0 if there is no such triangle. The other members are given by 2*r(n, m) = A278717(n, m) and 2*s(n, m) = A222946(n, m). See A278717 for details and the Keith Conrad reference. - Wolfdieter Lang, Nov 30 2016

Examples

			The triangle a(n,m) begins:
n\m   1   2   3   4   5   6    7    8    9   10   11 ...
2:    7
3:    0  17
4:   23   0  31
5:    0  41   0  49
6:   47   0   0   0  71
7:    0  73   0  89   0  97
8:   79   0 103   0 119   0  127
9:    0 113   0 137   0   0    0  161
10: 119   0 151   0   0   0  191    0  199
11:   0 161   0 193   0 217    0  233    0  241
12: 167   0   0   0 239   0  263    0    0    0  287
...
---------------------------------------------------------
The primitive triangle for (n,m) = (2,1) is (x,y,z) = (3,4,5), with a(2,1) = 3 + 4 = 7.
The primitive triangle for (n,m) = (7,4) is (x,y,z) = (33,56,65), with a(7,4) = 33 + 56 = 89.
The primitive triangle for (n,m) = (8,1) is (x,y,z) = (63,16,65), with a(8,1) = 63 + 16 = 79.
All primitive Pythagorean triangles with leg sums <= 167 are certainly covered by this triangle (rows n = 2..12), and the multiplicities are also correct, e.g., 119 appears twice.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth Edition, Clarendon Press, Oxford, 2003.
  • Ivan Niven, Herbert S. Zuckerman and Hugh L. Montgomery, An Introduction to the Theory Of Numbers, Fifth Edition, John Wiley and Sons, Inc., NY 1991.

Crossrefs

Cf. A222946 (hypotenuses), A222951 (perimeters), A056220 (main diagonals), A198441 (no zeros, ordered), A258149 (absolute leg differences), A278717 (leg differences).

Programs

  • Mathematica
    T[n_, m_] := If[n > m >= 1 && GCD[n, m] == 1 && (-1)^(n+m) == -1, (n+m)^2 - 2 m^2, 0];
    Table[T[n, m], {n, 2, 14}, {m, 1, n-1}] // Flatten (* Jean-François Alcover, Oct 22 2021 *)

Formula

a(n,m) = (n+m)^2 - 2*m^2 if n > m >= 1, gcd(n,m) = 1, and n and m are integers of opposite parity (i.e., (-1)^(n+m) = -1); otherwise a(n,m) = 0.

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

A275793 The x members of the positive proper solutions (x = x1(n), y = y1(n)) of the first class for the Pell equation x^2 - 2*y^2 = +7^2.

Original entry on oeis.org

9, 43, 249, 1451, 8457, 49291, 287289, 1674443, 9759369, 56881771, 331531257, 1932305771, 11262303369, 65641514443, 382586783289, 2229879185291, 12996688328457, 75750250785451, 441504816384249, 2573278647520043, 14998167068736009, 87415723764896011
Offset: 0

Views

Author

Wolfdieter Lang, Sep 27 2016

Keywords

Comments

This gives the (increasingly sorted) positive x members of the first class of the proper solutions (x1(n), y1(n)) to the Pell equation x^2 - 2*y^2 = +7^2. For the y1(n) solutions see 2*A275794(n). The solutions for the second class (x2(n), y2(n)) are found in A275795(n) and 2*A275796(n).
All solutions, including the improper ones, are given in A106525(n) and 2*A276600(n+2).
See also the comments on A263012 which apply here mutatis mutandis.
This is for the Pell equations x^2 - 2*y^2 = z^2, besides z^2 = 1 the first instance with proper solutions. For z^2 > 1 there seem to be always two classes of such solutions. For z^2 = 1 there is only one class of proper solutions. These z^2 values seem to appear for z from A058529 (prime factors are +1 or -1 (mod 8)).

Examples

			The first positive proper fundamental solution (x = x1(n), y = y1(n)) of x^2 - 2*y^2  = 49 are [9, 4], [43, 30], [249, 176], [1451, 1026], [8457, 5980], [49291, 34854], [287289, 203144], [1674443, 1184010], ...
The first positive proper fundamental solution of the second class (x = x2(n), y = y2(n)) are [11, 6], [57, 40], [331, 234], [1929, 1364], [11243, 7950], [65529, 46336], [381931, 270066], [2226057, 1574060], ...
		

References

  • T. Nagell, Introduction to Number Theory, Wiley, 1951, Theorem 109, pp. 207-208.

Crossrefs

Programs

  • Magma
    I:=[9,43]; [n le 2 select I[n] else 6*Self(n-1) - Self(n-2): n in [1..31]]; // G. C. Greubel, Sep 15 2021
    
  • Mathematica
    RecurrenceTable[{a[n]== 6a[n-1] -a[n-2], a[-1]==11, a[0]==9}, a, {n,0,25}] (* Michael De Vlieger, Sep 28 2016 *)
    Table[9*Fibonacci[2*n+1, 2] - Fibonacci[2*n, 2], {n,0,30}] (* G. C. Greubel, Sep 15 2021 *)
  • PARI
    a(n) = round((((3-2*sqrt(2))^n*(-8+9*sqrt(2))+(3+2*sqrt(2))^n*(8+9*sqrt(2)))) / (2*sqrt(2))) \\ Colin Barker, Sep 28 2016
    
  • PARI
    Vec((9-11*x)/(1-6*x+x^2) + O(x^30)) \\ Colin Barker, Oct 02 2016
    
  • Sage
    def P(n): return lucas_number1(n, 2, -1);
    [9*P(2*n+1) - P(2*n) for n in (0..30)] # G. C. Greubel, Sep 15 2021

Formula

a(n) = 43*S(n-1, 6) - 9*S(n-2, 6), with the Chebyshev polynomials S(n, 6) = A001109(n+1), n >= -1, with S(-2, 6) = -1.
O.g.f: (9 - 11*x)/(1 - 6*x + x^2).
a(n) = 6*a(n-1) - a(n-2) for n >= 1, with a(-1) = 11 and a(0) = 9.
a(n) = (((3-2*sqrt(2))^n*(-8+9*sqrt(2))+(3+2*sqrt(2))^n*(8+9*sqrt(2)))) / (2*sqrt(2)). - Colin Barker, Sep 28 2016
a(n) = 9*A000129(2*n+1) - A000129(2*n). - G. C. Greubel, Sep 15 2021

A060569 Consider Pythagorean triples which satisfy X^2+(X+7)^2=Z^2; sequence gives increasing values of Z.

Original entry on oeis.org

13, 17, 73, 97, 425, 565, 2477, 3293, 14437, 19193, 84145, 111865, 490433, 651997, 2858453, 3800117, 16660285, 22148705, 97103257, 129092113, 565959257, 752403973, 3298652285, 4385331725, 19225954453, 25559586377, 112057074433, 148972186537, 653116492145
Offset: 1

Views

Author

Keywords

Comments

The sequence gives the values of Z in X^2 + Y^2 = Z^2 where Y = X + 7 and gcd(X,Y,Z)=1. The values of X are given by the formula: X(1)=5, X(2)=8, X(3)=48, X(4)=65, X(n) = 6*X(n-2) - X(n-4) + 14 for n >= 5 - see A117474. Also, Y - X = 7, which is the second term in A058529. We have Z(1)=13, Z(2)=17, Z(3)=73, Z(4)=97, Z(n)=6*Z(n-2) - Z(n-4) for n >= 5. - Andras Erszegi (erszegi.andras(AT)chello.hu), Mar 19 2006

Programs

  • Maple
    f:=proc(n) option remember; if n=1 then RETURN(13) fi; if n=2 then RETURN(17) fi; if n=3 then RETURN(73) fi; if n=4 then RETURN(97) fi; 6*f(n-2)-f(n-4); end;
  • Mathematica
    LinearRecurrence[{0,6,0,-1},{13,17,73,97},30] (* Harvey P. Dale, Dec 02 2017 *)

Formula

G.f.: (13 + 17 x - 5 x^2 - 5 x^3)/(1 - 6 x^2 + x^4). - Robert Israel, Jul 17 2017

Extensions

Edited by N. J. A. Sloane, Oct 06 2007

A330174 Number of primitive 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, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2
Offset: 1

Views

Author

Ray Chandler, Feb 15 2020

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=Block[{ps,sps}, ps=First/@FactorInteger[n];
    sps=Select[ps,MemberQ[{1,7},Mod[#,8]]&];
    If[sps==ps&&n!=1,2^(Length[ps]-1),0]];  Table[f[n],{n,120}]

A145906 Concerning hypotenuses of triangles such that the sum of the two legs is a perfect square.

Original entry on oeis.org

9, 19, 27, 33, 57, 51, 51, 73, 89, 83, 107, 99, 139, 129, 137, 123, 129, 187, 187, 163, 177, 171, 209, 257, 201, 233, 267, 227, 251, 337, 243, 321, 313, 307, 297, 289, 291, 387, 411, 363, 347, 393, 339, 379, 369, 363, 417, 401, 393, 491, 499, 473, 593, 449
Offset: 0

Views

Author

Paul Curtz, Oct 23 2008

Keywords

Comments

Last digit is never 5.
Frenicle considers numbers N (apparently the set of A058529 or A120681) and their squares N^2. These have representations N=2*b^2-a^2 = d^2-2*c^2 with d=b+c and N^2 = 2*f^2-e^2 = h^2-2*g^2 with h=f+g. For example N=7 with a=1, b=2, c=1, d=3 and N^2=49 with e=1, f=5, g=4, h=9. The current sequence contains the list of h's.
Apparently the list of N^2 is A089552, the list of a in A143732, the list of b in A147847, the list of e (in different order) in A152910, the list of f (sorted into a different order) in A020882.

Examples

			(a,b,c,d,e,f,g,h) = (1,2,1,3,1,5,4,9) with N=7 or  (1,3,2,5,7,13,6,19) with N=17 or (3,4,1,5,7,17,10,27) with N=23 or (1,4,3,7,17,25,8,33) with N=31.
		

Crossrefs

A156680 Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, gcd (A, B) = 1, A < BA020884(n)).

Original entry on oeis.org

1, 7, 17, 7, 31, 49, 23, 71, 97, 47, 127, 161, 1, 79, 199, 241, 119, 287, 337, 17, 167, 391, 449, 223, 23, 511, 577, 41, 287, 647, 41, 721, 359, 799, 881, 73, 439, 967, 1057, 7, 527, 1151, 89, 1249, 113, 623, 1351, 1457, 727, 119, 1567, 1681, 31, 161, 839, 1799, 1921
Offset: 1

Views

Author

Ant King, Feb 15 2009

Keywords

Comments

This sequence contains the differences in the legs of the primitive Pythagorean triples, sorted by shortest side (A020884). If a difference appears once then it must appear infinitely often, for if (m,n) generates a primitive triple with Abs(b-a)=d then so too does (2m+n,m). This corresponds to applying Hall's A matrix, and hence all horizontal lines in the Pythagorean family tree will contain families of primitive triples whose legs differ by the same amount. The sorted differences that can occur are in A058529.

Examples

			As the first four primitive Pythagorean triples (ordered by increasing A) are (3,4,5), (5,12,13), (7,24,25) and (8,15,17), then a(1)=4-3=1, a(2)=12-5=7, a(3)=24-7=17 and a(4)=15-8=7.
		

References

  • Barning, F. J. M.; On Pythagorean and quasi-Pythagorean triangles and a generation process with the help of unimodular matrices. (Dutch), Math. Centrum Amsterdam Afd. Zuivere Wisk. ZW-001 (1963).

Crossrefs

Programs

  • Mathematica
    PrimitivePythagoreanTriplets[n_]:=Module[{t={{3,4,5}},i=4,j=5},While[i
    				

Formula

a(n) = A156678(n) - A020884(n).
Previous Showing 11-20 of 32 results. Next