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

A350923 a(0) = 2, a(1) = 2, and a(n) = 10*a(n-1) - a(n-2) - 4 for n >= 2.

Original entry on oeis.org

2, 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

Max Alekseyev, Jan 22 2022

Keywords

Comments

One of 10 linear second-order recurrence sequences satisfying (a(n)*a(n-1)-1) * (a(n)*a(n+1)-1) = (a(n)+1)^4 and together forming A350916.
Essentially the same as A157085. - R. J. Mathar, Feb 07 2022

Crossrefs

Other sequences satisfying (a(n)*a(n-1)-1) * (a(n)*a(n+1)-1) = (a(n)+1)^4: A103974, A350917, A350919, A350920, A350921, A350922, A350924, A350925, A350926.

Programs

  • Mathematica
    LinearRecurrence[{11, -11, 1}, {2, 2, 14}, 25] (* Paolo Xausa, May 30 2025 *)

Formula

G.f.: 2*(1 - 10*x + 7*x^2)/((1 - x)*(1 - 10*x + x^2)). - Stefano Spezia, Jan 22 2022
From Hugo Pfoertner, Jan 22 2022: (Start)
a(n) = A031138(n) + 1.
a(n) = 3*A054318(n) - 1.
a(n) = 12*A097784(n-2) + 2 for n >= 2. (End)
a(n) = 2 * A253175(n) for n>=1. - Alois P. Heinz, Jan 22 2022

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

Original entry on oeis.org

0, 10, 108, 1078, 10680, 105730, 1046628, 10360558, 102558960, 1015229050, 10049731548, 99482086438, 984771132840, 9748229241970, 96497521286868, 955226983626718, 9455772314980320
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=3, then first(2) = 312 = 14*21 - 0 + 18.
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=3 and n=2, first(2) = 312 = 7*21 + 6*27 + 3 and last(2) = 363 = 8*21 + 7*27 + 6. a(n) = (2^(n+1)((1+sqrt(3/2))^(2n+1) + (1-sqrt(3/2))^(2n+1)) - 2*2)/4; e.g., 108 = (2^3((1+sqrt(3/2))^5 + (1-sqrt(3/2))^5) - 2*2)/4.
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=3 and n=2, then first(2) = 312 = (3^3((1+sqrt((4/3))^(5) + (1-sqrt(4/3)^5) - 2*3)/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(3) = 1078 = 2*11*49 and a(4) = 10680 = 3*40*89.
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) = 108 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

  • Magma
    [(1/2 + Sqrt(6)/4)*(5 + 2*Sqrt(6))^n - (Sqrt(6)/4 - 1/2)*(5 - 2*Sqrt(6))^n - 1: n in [0..50]]; // G. C. Greubel, Nov 04 2017
  • Mathematica
    CoefficientList[Series[2*x*(-5 + x)/((x - 1)*(x^2 - 10*x + 1)), {x, 0, 50}], x] (* G. C. Greubel, Nov 04 2017 *)
  • PARI
    x='x+O('x^50); concat([0], Vec(2*(x - 5)/((x-1)*(x^2 - 10*x + 1)))) \\ G. C. Greubel, Nov 04 2017
    

Formula

For n > 1, a(n) = 10*a(n-1) - a(n-2) + 8.
For n > 0, a(n) = 5*a(n-1) + 4*A157085(n-1) + 2.
Lim_{n->inf} a(n+1)/a(n) = 2(1 + sqrt(3/2))^2 = 5 + 2*sqrt(6).
From R. J. Mathar, Mar 19 2009: (Start)
G.f.: 2*x*(x - 5)/((x-1)*(x^2 - 10*x + 1)).
a(n) = 11*a(n-1) - 11*a(n-2) + a(n-3).
a(n) = 2*A087125(n) = A054320(n) - 1. (End)
From Sergei N. Gladkovskii, Jan 12 2012: (Start)
G.f.: 1/(x-1) + (x+1)/(x^2-10*x+1).
a(n) = (1/2 + sqrt(6)/4)*(5 + 2*sqrt(6))^n - (sqrt(6)/4 - 1/2)*(5 - 2*sqrt(6))^n - 1. (End)

A157093 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 Z values.

Original entry on oeis.org

4, 44, 764, 13684, 245524, 4405724, 79057484, 1418628964, 25456263844, 456794120204, 8196837899804, 147086288076244, 2639356347472564, 47361327966429884, 849864547048265324, 15250200518902345924, 273653744793193961284, 4910517205758588957164, 88115655958861407267644
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=5, then last(2) = 1385 = 22*65 - 5 - 40.
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 + 10*65 + 10.
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=5 and n=2, then last(2) = 1385 = 5^2*6*((1+sqrt(6/5))^5 - (1-sqrt(6/5))^5)/(4*sqrt(6/5)) + 4/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) = 13684 = (144^2 + 4^2*17^2 + 4*3*144*17)/4 and a(4) = 245524 = (4*(341^2 + 161^2 + 3*341*161))/5.
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+41+42+43+44+761+762+763+764 = 3230 = 10*323.
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)=764 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

  • Mathematica
    LinearRecurrence[{19, -19, 1}, {4, 44, 764}, 25] (* Paolo Xausa, May 29 2025 *)

Formula

For n > 1, a(n) = 18*a(n-1) - a(n-2) - 24.
For n > 0, a(n) = 10*A157092(n-1) + 9*a(n-1) + 8.
a(n) = 4^n*5*((1+sqrt(5/4))^(2*n+1) - (1-sqrt(5/4))^(2*n+1))/(4*sqrt(5/4)) + 3/2.
Limit_{n->oo} a(n+1)/a(n) = 4*(1+sqrt(5/4))^2 = 9 + 2*sqrt(20).
Empirical g.f.: 4*(1-8*x+x^2)/((1-x)*(1-18*x+x^2)). - Colin Barker, Mar 27 2012

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)

A379744 Number of primitive Pythagorean quintuples (a, b, c, d, e) with 0 < a <= b <= c <= d <= e <= 10^n.

Original entry on oeis.org

10, 5568, 5302303, 5279762116, 5277410421368, 5277177914347752, 5277147974562930196, 5277145259376056385184, 5277145005746992952994327
Offset: 1

Views

Author

Asif Ahmed, Dec 31 2024

Keywords

Comments

A Pythagorean quintuple (x,y,z,w,u) is a solution to x^2+y^2+z^2+w^2=u^2.

Examples

			a(1) = 10 because there are ten primitive solutions (a, b, c, d, e) as follows: (1, 1, 1, 1, 2), (1, 1, 3, 5, 6), (1, 1, 7, 7, 10), (1, 2, 2, 4, 5), (1, 3, 3, 9, 10), (1, 4, 4, 4, 7), (1, 5, 5, 7, 10), (2, 2, 3, 8, 9), (2, 2, 4, 5, 7), and (2, 4, 5, 6, 9) with e <= 10.
		

Crossrefs

Formula

Limit_{n -> oo} a(n)/ 10^(3*n) = 5/(96*Pi^2) ~ 0.005277144981371758929368722042173314526269...
a(n) ~ 5*10^(3*n)/(96*Pi^2) + (3/A - 1/G)*10^(2*n)/64 + (1/(2*sqrt(3)) - 1/(4*sqrt(2)))*10^n/Pi, where A is the Dirichlet L-function value evaluated at s = 2 for the Dirichlet character with modulus 8 and index 4, and G is the Catalan's constant. (A ~ 1.064734171043503370392827451461668889483, G ~ 0.9159655941772190150546035149323841107741)
Showing 1-6 of 6 results.