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.

A157085 Consider all Consecutive Integer Pythagorean quintuples (X, X+1, X+2, Z-1, Z) ordered by increasing Z; sequence gives Z values.

Original entry on oeis.org

2, 14, 134, 1322, 13082, 129494, 1281854, 12689042, 125608562, 1243396574, 12308357174, 121840175162, 1206093394442, 11939093769254, 118184844298094, 1169909349211682, 11580908647818722, 114639177128975534, 1134810862641936614, 11233469449290390602, 111199883630261969402
Offset: 0

Views

Author

Charlie Marion, Mar 12 2009

Keywords

Comments

"Consecutive Integer Pythagorean quintuple" means that X^2 + (X+1)^2 + (X+2)^2 = (Z-1)^2 + Z^2. - M. F. Hasler, Oct 04 2014
The last terms of Consecutive Integer Pythagorean 2k+1-tuples may be found as follows: let last(0)=0, last(1)=k*(2k+3) and, for n > 1, last(n) = (4k+2)*last(n-1) - last(n-2) - 2*k*(k-1); e.g., if k=3, then last(2) = 363 = 14*27 - 3 - 12.
For n > 0, a(n) = 6*a(n-1) + 5*A157084(n-1) + 4; e.g., 1322 = 6*108 + 5*134 + 4.
The first and last terms of Consecutive Integer Pythagorean 2k+1-tuples may be found as follows: let first(0)=0 and last(0)=k; for n > 0, let first(n) = (2k+1)*first(n-1) + 2k*last(n-1) + k and last(n) = (2k+2)*first(n-1) + (2k+1)*last(n-1) + 2k; e.g., if k=3 and n=2, then first(2) = 312 = 7*21 + 6*27+3 and last(2) = 363 = 8*21 + 7*27 + 6.
a(n) = 2^n*3*((1+sqrt(3/2))^(2*n+1) - (1-sqrt(3/2))^(2*n+1))/(4*sqrt(3/2)) + 1/2; e.g., 134 = 2^2*3*((1+sqrt(3/2))^5 - (1-sqrt(3/2))^5)/(4*sqrt(3/2)) + 1/2.
The last terms of Consecutive Integer Pythagorean 2k+1-tuples may be found as follows: if q=(k+1)/k, then last(n) = k^n*(k+1)*((1+sqrt(q))^(2*n+1) - (1-sqrt(q))^(2*n+1))/(4*sqrt(q)) + (k-1)/2; e.g., if k=3 and n=2, then last(2) = 363 = 3^2*4*((1+sqrt(4/3))^5 - (1-sqrt(4/3))^5)/(4*sqrt(4/3)) + 2/2.
If u(n) is the numerator and e(n) is the denominator of the n-th continued fraction convergent to sqrt((k+1)/k), then the last terms of Consecutive Integer Pythagorean 2k+1-tuples may be found as follows:
last(2n+1) = (e(2n+1)^2 + k^2*e(2n)^2 + k*(k-1)*e(2n+1)*e(n))/k and, for n > 0, last(2n) = (k*(u(2n)^2 + u(2n-1)^2 + (k-1)*u(2n)*u(2n-1)))/(k+1); e.g., a(3) = 1322 = (40^2 + 2^2*9^2 + 2*1*40*9)/2 and a(4) = 13082 = (2*(109^2 + 49^2 + 1*109*49))/3.
If b(0)=1, b(1)=4k+2 and, for n > 1, b(n) = (4k+2)*b(n-1) - b(n-2), and last(n) is the last term of the n-th Consecutive Integer Pythagorean 2k+1-tuple as defined above, then Sum_{i=0..n} (k*last(i) - k(k-1)/2) = k(k+1)/2*b(n); e.g., if n=3, then 1 + 2 + 13 + 14 + 133 + 134 = 297 = 3*99.
If first(n) is the first term of the n-th Consecutive Integer Pythagorean 2k+1-tuple, then lim_{n->infinity} first(n+1)/first(n) = k*(1+sqrt((k+1)/k))^2 = 2k + 1 + 2*sqrt(k^2+k).

Examples

			a(3) = 134 since 108^2 + 109^2 + 110^2 = 133^2 + 134^2.
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, 1964, pp. 122-125.
  • L. E. Dickson, History of the Theory of Numbers, Vol. II, Diophantine Analysis. Dover Publications, Inc., Mineola, NY, 2005, pp. 181-183.
  • W. Sierpinski, Pythagorean Triangles. Dover Publications, Mineola NY, 2003, pp. 16-22.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{11, -11, 1}, {2, 14, 134}, 25] (* Paolo Xausa, May 29 2025 *)
  • PARI
    for(y=0,oo,yy=(y+2)^2+(y+1)^2;for(x=sqrtint(yy\3),ceil(sqrt(yy/3)),x^2+(x-1)^2+(x-2)^2==yy&&print1(y+2,", "))) \\ For illustrative purpose. - M. F. Hasler, Oct 04 2014

Formula

For n > 1, a(n) = 10*a(n-1) - a(n-2) - 4; e.g., 1322 = 10*134 - 14 - 4.
Limit_{n->oo} a(n+1)/a(n) = 2*(1+sqrt(3/2))^2 = 5 + 2*sqrt(6).
G.f.: 2*(1-4*x+x^2)/((1-x)*(x^2-10*x+1)). - Colin Barker, Jan 01 2012
a(n) = 2*A253175(n+1). - R. J. Mathar, Feb 07 2022

Extensions

Edited by M. F. Hasler, Oct 04 2014

A157092 Consider all consecutive integer Pythagorean 9-tuples (X, X+1, X+2, X+3, X+4, Z-3, Z-2, Z-1, Z) ordered by increasing Z; sequence gives X values.

Original entry on oeis.org

0, 36, 680, 12236, 219600, 3940596, 70711160, 1268860316, 22768774560, 408569081796, 7331474697800, 131557975478636, 2360712083917680, 42361259535039636, 760141959546795800, 13640194012307284796, 244763350261984330560, 4392100110703410665316, 78813038642399407645160
Offset: 0

Views

Author

Charlie Marion, Mar 12 2009

Keywords

Comments

In general, the first terms of consecutive integer Pythagorean 2k+1-tuples may be found as follows: let first(0)=0, first(1) = k*(2k+1) and, for n > 1, first(n) = (4k+2)*first(n-1) - first(n-2) + 2*k^2; e.g., if k=5, then first(2) = 1260 = 22*55 - 0 + 50.
In general, the first and last terms of consecutive integer Pythagorean 2k+1-tuples may be found as follows: let first(0)=0 and last(0)=k; for n > 0, let first(n) = (2k+1)*first(n-1) + 2k*last(n-1) + k and last(n) = (2k+2)*first(n-1) + (2k+1)*last(n-1) + 2k; e.g., if k=5 and n=2, then first(2) = 1260 = 11*55 + 10*65 + 5 and last(2) = 1385 = 12*55 + 11*65 + 10.
In general, the first terms of consecutive integer Pythagorean 2k+1-tuples may be found as follows: first(n) = (k^(n+1)((1+sqrt((k+1)/k))^(2n+1) + (1-sqrt((k+1)/k))^(2n+1)) - 2*k)/4; e.g., if k=5 and n=2, then first(2) = 1260 = (5^3((1+sqrt((6/5))^5 + (1-sqrt(6/5))^5) - 2*5)/4.
In general, if u(n) is the numerator and e(n) is the denominator of the n-th continued fraction convergent to sqrt((k+1)/k), then the first terms of consecutive integer Pythagorean 2k+1-tuples may be found as follows: first(2n+1) = k*u(2n)*u(2n+1) and, for n > 0, first(2n) = (k+1)*e(2n-1)*e(2n); e.g., a(1) = 36 = 4*1*9 and a(2) = 680 = 5*8*17.
In general, if first(n) is the first term of the n-th consecutive integer Pythagorean 2k+1-tuple, then lim_{n->inf} first(n+1)/first(n) = k*(1+sqrt((k+1)/k))^2 = 2k + 1 + 2*sqrt(k^2+k).

Examples

			a(2)=680 since 680^2 + 681^2 + 682^2 + 683^2 + 684^2 = 761^2 + 762^2 + 763^2 + 764^2.
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, 1964, pp. 122-125.
  • L. E. Dickson, History of the Theory of Numbers, Vol. II, Diophantine Analysis. Dover Publications, Inc., Mineola, NY, 2005, pp. 181-183.
  • W. Sierpinski, Pythagorean Triangles. Dover Publications, Mineola NY, 2003, pp. 16-22.

Crossrefs

Programs

  • Magma
    [Round((4^(n+1)*((1+Sqrt(5/4))^(2*n+1) + (1-Sqrt(5/4))^(2*n+1)) - 2*4)/4): n in [0..50]]; // G. C. Greubel, Nov 04 2017
  • Mathematica
    RecurrenceTable[{a[0]==0,a[1]==36,a[n]==18a[n-1]-a[n-2]+32},a,{n,20}] (* or *) LinearRecurrence[{19,-19,1},{0,36,680},20] (* Harvey P. Dale, Oct 09 2012 *)
  • PARI
    x='x+O('x^50); concat([0], Vec(4*x*(-9+x)/((x-1)*(x^2-18*x+1)))) \\ G. C. Greubel, Nov 04 2017
    

Formula

For n > 1, a(n) = 18*a(n-1) - a(n-2) + 32.
For n > 0, a(n) = 9*a(n-1) + 8*A157093(n-1) + 4.
a(n) = (4^(n+1)((1+sqrt(5/4))^(2n+1) + (1-sqrt(5/4))^(2n+1)) - 2*4)/4.
Lim_{n->inf} a(n+1)/a(n) = 4*(1+sqrt(5/4))^2 = 9 + 2*sqrt(20).
From R. J. Mathar, Mar 19 2009: (Start)
G.f.: 4*x*(-9+x)/((x-1)*(x^2-18*x+1)).
a(n) = 19*a(n-1) - 19*a(n-2) + a(n-3).
a(n) = 4*A119032(n+1). (End)
For n > 0, 1/a(n) = Sum_{k>=1} F(3*k)/phi^(6*k*n + 3*k), where F(n) = A000045(n) and phi = A001622 = (sqrt(5)+1)/2. - Diego Rattaggi, Dec 28 2019
E.g.f.: (1/2)*((2 + sqrt(5))*exp((9+4*sqrt(5))*x) + (2 - sqrt(5))*exp((9-4*sqrt(5))*x) - 4*exp(x)). - Stefano Spezia, Dec 29 2019

Extensions

Terms a(15) onward added by G. C. Greubel, Nov 06 2017

A157097 Consider all Consecutive Integer Pythagorean 11-tuples (X, X+1, X+2, X+3, X+4, X+5, Z-4, Z-3, Z-2, Z-1, Z) ordered by increasing Z; sequence gives Z values.

Original entry on oeis.org

5, 65, 1385, 30365, 666605, 14634905, 321301265, 7053992885, 154866542165, 3400009934705, 74645352021305, 1638797734533965, 35978904807725885, 789897108035435465, 17341757471971854305, 380728767275345359205, 8358691122585626048165, 183510475929608427700385, 4028871779328799783360265
Offset: 0

Views

Author

Charlie Marion, Mar 12 2009

Keywords

Comments

In general, the last terms of Consecutive Integer Pythagorean 2k+1-tuples may be found as follows: let last(0)=0, last(1)=k*(2k+3) and, for n > 1, last(n) = (4k+2)*last(n-1) - last(n-2)-2*k*(k-1); e.g., if k=6, then last(2) = 2274 = 26*90 - 6 - 60.
In general, the first and last terms of Consecutive Integer Pythagorean 2k+1-tuples may be found as follows: let first(0)=0 and last(0)=k; for n > 0, let first(n) = (2k+1)*first(n-1) + 2k*last(n-1) + k and last(n) = (2k+2)*first(n-1) + (2k+1)*last(n-1) + 2k; e.g., if k=6 and n=2, then first(2) = 2100 = 13*78 + 12*90 + 6 and last(2) = 2274 = 14*78 + 13*90 + 12.
In general, the last terms of Consecutive Integer Pythagorean 2k+1-tuples may be found as follows: if q=(k+1)/k, then last(n) = k^n*(k+1)*((1+sqrt(q))^(2*n+1) - (1-sqrt(q))^(2*n+1))/(4*sqrt(q)) + (k-1)/2; e.g., if k=6 and n=2, then last(2) = 2274 = 6^2*7*((1+sqrt(7/6))^5 - (1-sqrt(7/6))^5)/(4*sqrt(7/6)) + 5/2.
In general, if u(n) is the numerator and e(n) is the denominator of the n-th continued fraction convergent to sqrt((k+1)/k), then the last terms of Consecutive Integer Pythagorean 2k+1-tuples may be found as follows: last(2n+1) = (e(2n+1)^2 + k^2*e(2n)^2 + k*(k-1)*e(2n+1)*e(n))/k and, for n > 0, last(2n) = (k*(u(2n)^2 + u(2n-1)^2 + (k-1)*u(2n)*u(2n-1)))/(k+1); e.g., a(3) = 30365 = (220^2 + 5^2*21^2 + 5*4*220*21)/5 and a(4) = 666605 = (5*(505^2 + 241^2 + 4*505*241))/6.
In general, if b(0)=1, b(1)=4k+2 and, for n > 1, b(n) = (4k+2)*b(n-1) - b(n-2), and last(n) is the last term of the n-th Consecutive Integer Pythagorean 2k+1-tuple as defined above, then Sum_{i=0..n} (k*last(i) - k(k-1)/2) = k(k+1)/2*b(n); e.g., if n=3, then 1+2+3+4+5+61+62+63+64+65+1381+1382+1383+1384+1385 = 7245 = 15*483.
In general, if last(n) is the last term of the n-th Consecutive Integer Pythagorean 2k+1-tuple, then lim_{n->infinity} last(n+1)/last(n) = k*(1+sqrt((k+1)/k))^2 = 2k + 1 + 2*sqrt(k^2+k).

Examples

			a(2)=65 since 55^2 + 56^2 + 57^2 + 58^2 + 59^2 + 60^2 = 61^2 + 62^2 + 63^2 + 64^2 + 65^2.
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, 1964, pp. 122-125.
  • L. E. Dickson, History of the Theory of Numbers, Vol. II, Diophantine Analysis. Dover Publications, Inc., Mineola, NY, 2005, pp. 181-183.
  • W. Sierpinski, Pythagorean Triangles. Dover Publications, Mineola NY, 2003, pp. 16-22.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{23, -23, 1}, {5, 65, 1385}, 25] (* Paolo Xausa, May 29 2025 *)

Formula

For n > 1, a(n) = 22*a(n-1) - a(n-2) - 40.
For n > 0, a(n) = 12*A157096(n-1) + 11*a(n-1) + 10.
a(n) = 5^n*6*((1+sqrt(6/5))^(2*n+1) - (1-sqrt(6/5))^(2*n+1))/(4*sqrt(6/5)) + 4/2; e.g., 1385 = 5^2*6*((1+sqrt(6/5))^5 - (1-sqrt(6/5))^5)/(4*sqrt(6/5)) + 4/2.
Limit_{n->oo} a(n+1)/a(n) = 5*(1+sqrt(6/5))^2 = 11 + 2*sqrt(30).
G.f.: 5*(1-10*x+x^2)/((1-x)*(1-22*x+x^2)). - Colin Barker, Mar 27 2012
a(n) = 23*a(n-1) - 23*a(n-2) + a(n-3). - Wesley Ivan Hurt, Oct 26 2020

Extensions

a(13), a(15) corrected by Georg Fischer, Oct 26 2020

A157089 Consider all consecutive integer Pythagorean septuples (X, X+1, X+2, X+3, Z-2, Z-1, Z) ordered by increasing Z; sequence gives Z values.

Original entry on oeis.org

3, 27, 363, 5043, 70227, 978123, 13623483, 189750627, 2642885283, 36810643323, 512706121227, 7141075053843, 99462344632563, 1385331749802027, 19295182152595803, 268747218386539203, 3743165875258953027
Offset: 0

Views

Author

Charlie Marion, Mar 12 2009

Keywords

Comments

The last terms of consecutive integer Pythagorean (2k+1)-tuples may be found as follows: let last(0)=0, last(1)=k*(2k+3) and, for n > 1, last(n) = (4k+2)*last(n-1) - last(n-2) - 2*k*(k-1); e.g., if k=4, then last(2) = 764 = 18*44 - 4 - 24.
In general, the first and last terms of consecutive integer Pythagorean (2k+1)-tuples may be found as follows: let first(0)=0 and last(0)=k; for n > 0, let first(n) = (2k+1)*first(n-1) + 2k*last(n-1) + k and last(n) = (2k+2)*first(n-1) + (2k+1)*last(n-1) + 2k; e.g., if k=4 and n=2, then first(2) = 680 = 9*36 + 8*44 + 4 and last(2) = 764 = 10*36 + 9*44 + 8.
The last terms of consecutive integer Pythagorean (2k+1)-tuples may be found as follows: if q = (k+1)/k, then last(n) = k^n*(k+1)*((1+sqrt(q))^(2*n+1) - (1-sqrt(q))^(2*n+1))/(4*sqrt(q)) + (k-1)/2; e.g., if k=4 and n=2, then last(2) = 764 = 4^2*5*((1+sqrt(5/4))^5 - (1-sqrt(5/4))^5)/(4*sqrt(5/4)) + 3/2.
If u(n) is the numerator and e(n) is the denominator of the n-th continued fraction to sqrt((k+1)/k), then the last terms of consecutive integer Pythagorean (2k+1)-tuples may be found as follows:
last(2n+1) = (e(2n+1)^2 + k^2*e(2n)^2 + k*(k-1)*e(2n+1)*e(n))/k and, for n > 0, last(2n) = (k*(u(2n)^2 + u(2n-1)^2 + (k-1)*u(2n)*u(2n-1)))/(k+1); e.g., a(3) = 5043 = (84^2 + 3^2*13^2 + 3*2*84*13)/3 and a(4) = 70227 = (3*(209^2 + 97^2 + 2*209*97))/4.
If b(0)=1, b(1)=4k+2 and, for n > 1, b(n) = (4k+2)*b(n-1) - b(n-2), and last(n) is the last term of the n-th consecutive integer Pythagorean (2k+1)-tuple as defined above, then Sum_{i=0..n} (k*last(i) - k(k-1)/2) = k(k+1)/2*b(n); e.g., if n=3, then 1+2+3+25+26+27+361+362+363 = 1170 = 6*195.
Lim_{n->infinity} a(n+1)/a(n) = 3*(1+sqrt(4/3))^2 = 7 + 2*sqrt(12).
If first(n) is the first term of the n-th consecutive integer Pythagorean (2k+1)-tuple, then lim_{n->infinity} first(n+1)/first(n) = k*(1+sqrt((k+1)/k))^2 = 2k + 1 + 2*sqrt(k^2+k).
The generalization using the binomial formula is : a(n,k)= ((k-1) + (k+1)*k^n*(Sum_{j=0..n} binomial(2*n+1, 2*j+1)*(1+1/k)^j)))/2. - Gerry Martens, Aug 19 2025

Examples

			a(3) = 363 since 312^2 + 313^2 + 314^2 + 315^2 = 361^2 + 362^2 + 363^2.
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, 1964, pp. 122-125.
  • L. E. Dickson, History of the Theory of Numbers, Vol. II, Diophantine Analysis. Dover Publications, Inc., Mineola, NY, 2005, pp. 181-183.
  • W. Sierpinski, Pythagorean Triangles. Dover Publications, Mineola NY, 2003, pp. 16-22.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{15,-15,1},{3,27,363},20] (* Harvey P. Dale, May 14 2022 *)

Formula

For n > 1, a(n) = 14*a(n-1) - a(n-2) - 12.
a(n) = 8*a(n-1) + 7*A157088(n-1) + 6.
G.f.: (3-18*x+3*x^2)/(1-15*x+15*x^2-x^3). - Colin Barker, Jan 01 2012
From Gerry Martens, Aug 19 2025: (Start)
a(n) = ((1 + sqrt(3))^(2*n+1) - (1 - sqrt(3))^(2*n+1))^2/4^(n+1).
a(n) = 1/(3*4^n)*(Sum_{k=0..n} binomial(2*n+1, 2*k+1)*3^(k+1))^2. (End)
Showing 1-4 of 4 results.