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

A071101 Expansion of (5 + 6*x + 3*x^2 - 2*x^3) / (1 - 2*x - 2*x^2 - 2*x^3 + x^4) in powers of x.

Original entry on oeis.org

5, 16, 45, 130, 377, 1088, 3145, 9090, 26269, 75920, 219413, 634114, 1832625, 5296384, 15306833, 44237570, 127848949, 369490320, 1067846845, 3086134658, 8919094697, 25776662080, 74495936025, 215297250946, 622220603405, 1798250918672, 5197041610021
Offset: 0

Views

Author

N. J. A. Sloane, May 28 2002

Keywords

Comments

Number of tilings of the 2-mod-4 pillow of order n is a perfect square times a(n). [Propp, 1999, p. 272]

Examples

			G.f. = 5 + 16*x + 45*x^2 + 130*x^3 + 377*x^4 + 1088*x^5 + 3145*x^6 + 9090*x^7 + ...
		

References

  • J. Propp, Enumeration of matchings: problems and progress, pp. 255-291 in L. J. Billera et al., eds, New Perspectives in Algebraic Combinatorics, Cambridge, 1999 (see Problem 12).

Crossrefs

Programs

  • GAP
    a:=[5,16,45,130];; for n in [5..30] do a[n]:=2*a[n-1]+2*a[n-2] +2*a[n-3]-a[n-4]; od; a; # Muniru A Asiru, Sep 12 2018
    
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (5+6*x+3*x^2-2*x^3)/(1-2*x-2*x^2-2*x^3+x^4) )); // G. C. Greubel, Jul 29 2019
    
  • Maple
    seq(coeff(series((5+6*x+3*x^2-2*x^3)/(1-2*x-2*x^2-2*x^3+x^4),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Sep 12 2018
  • Mathematica
    Table[Abs[Fibonacci[n+3, 1+I]]^2, {n,0,30}] (* Vladimir Reshetnikov, Oct 05 2016 *)
    CoefficientList[Series[(5+6*x+3*x^2-2*x^3)/(1-2*x-2*x^2-2*x^3+x^4), {x, 0, 30}], x] (* Stefano Spezia, Sep 12 2018 *)
    LinearRecurrence[{2,2,2,-1},{5,16,45,130},30] (* Harvey P. Dale, Oct 03 2024 *)
  • PARI
    {a(n) = my(m = abs(n+3)); polcoeff( (x - x^3) / (1 - 2*x - 2*x^2 - 2*x^3 + x^4) + x * O(x^m), m)};  /* Michael Somos, Dec 15 2011 */
    
  • PARI
    x='x+O('x^33); Vec((5+6*x+3*x^2-2*x^3)/(1-2*x-2*x^2-2*x^3+x^4)) \\ Altug Alkan, Sep 12 2018
    
  • Python
    from math import log
    a0,a1,a2,a3,n = 130,45,16,5,3
    print(0,a3)
    print(1,a2)
    print(2,a1)
    print(3,a0)
    while log(a0)/log(10) < 1000:
        a0,a1,a2,a3,n = 2*(a0+a1+a2)-a3,a0,a1,a2,n+1
        print(n,a0) # A.H.M. Smeets, Sep 12 2018
    
  • Sage
    ((5+6*x+3*x^2-2*x^3)/(1-2*x-2*x^2-2*x^3+x^4)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jul 29 2019

Formula

G.f.: (5 + 6*x + 3*x^2 - 2*x^3) / (1 - 2*x - 2*x^2 - 2*x^3 + x^4).
a(-n) = a(-6 + n). a(-1) = 2, a(-2) = 1, a(-3) = 0. a(n) = 2*a(n-1) + 2*a(n-2) + 2*a(n-3) - a(n-4). - Michael Somos, Dec 15 2011
A112835(2*n + 3) = a(n).
Lim_{n -> inf} a(n)/a(n-1) = A318605. - A.H.M. Smeets, Sep 12 2018

A138573 a(n) = 2*a(n-1) + 2*a(n-2) + 2*a(n-3) - a(n-4); a(0)=0, a(1)=1, a(2)=2, a(3)=5.

Original entry on oeis.org

0, 1, 2, 5, 16, 45, 130, 377, 1088, 3145, 9090, 26269, 75920, 219413, 634114, 1832625, 5296384, 15306833, 44237570, 127848949, 369490320, 1067846845, 3086134658, 8919094697, 25776662080, 74495936025, 215297250946, 622220603405
Offset: 0

Views

Author

Benoit Cloitre, May 12 2008

Keywords

Comments

This is a divisibility sequence; that is, if n divides m, then a(n) divides a(m). - T. D. Noe, Dec 23 2008
Case P1 = 2, P2 = -4, Q = 1 of the 3-parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 04 2014

Crossrefs

Programs

  • GAP
    a:=[0,1,2,5];; for n in [5..30] do a[n]:=2*a[n-1]+2*a[n-2]+2*a[n-3]-a[n-4]; od; a; # Muniru A Asiru, Sep 12 2018
  • Maple
    seq(coeff(series((x*(1-x)*(x+1))/(1-2*x-2*x^2-2*x^3+x^4),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Sep 12 2018
  • Mathematica
    Round@Table[(((GoldenRatio + Sqrt[GoldenRatio])^n + (GoldenRatio - Sqrt[GoldenRatio])^n)/2 - (-1)^n Cos[n ArcTan[Sqrt[GoldenRatio]]])/Sqrt[5], {n, 0, 20}] (* or *) LinearRecurrence[{2, 2, 2, -1}, {0, 1, 2, 5}, 20] (* Vladimir Reshetnikov, May 11 2016 *)
    Table[Abs[Fibonacci[n, 1 + I]]^2, {n, 0, 20}] (* Vladimir Reshetnikov, Oct 05 2016 *)
    CoefficientList[Series[-x*(x-1)*(1+x)/(1-2*x-2*x^2-2*x^3+x^4), {x, 0, 20}], x] (* Stefano Spezia, Sep 12 2018 *)
  • PARI
    my(x='x+O('x^50)); concat([0], Vec(x*(1-x)*(1+x)/(1 -2*x -2*x^2 -2*x^3 +x^4))) \\ G. C. Greubel, Aug 08 2017
    

Formula

a(n) = round(w^n/2/sqrt(5)) where w = (1+r)/(1-r) = 2.89005363826396... and r = sqrt(sqrt(5)-2) = 0.485868271756...; for n >= 3, a(n) = A071101(n+3).
G.f.: -x*(x-1)*(1+x)/(1 - 2*x - 2*x^2 - 2*x^3 + x^4). - R. J. Mathar, Jun 03 2009
From Peter Bala, Mar 04 2014: (Start)
Define a Lucas sequence {U(n)} in the ring of Gaussian integers by the recurrence U(n) = (1 + i)*U(n-1) + U(n-2) with U(0) = 0 and U(1) = 1. Then a(n) = |U(n)|^2.
Let a, b denote the zeros of x^2 - (1 + i)*x - 1 and c, d denote the zeros of x^2 - (1 - i)*x - 1.
Then a(n) = (a^n - b^n)*(c^n - d^n)/((a - b)*(c - d)).
a(n) = (alpha(1)^n + beta(1)^n - alpha(2)^n - beta(2)^n)/(2*sqrt(5)), where alpha(1), beta(1) are the roots of x^2 - ( 1 + sqrt(5))*x + 1 = 0, and alpha(2), beta(2) are the roots of x^2 - (1 - sqrt(5))*x + 1 = 0.
The o.g.f. is the Hadamard product of the rational functions x/(1 - (1 + i)x - x^2) and x/(1 - (1 - i)x - x^2). (End)
From Peter Bala, Mar 24 2014: (Start)
a(n) = (1/sqrt(5))*(T(n,phi) - T(n,-1/phi)), where phi = 1/2*(1 + sqrt(5)) is the golden ratio and T(n,x) denotes the Chebyshev polynomial of the first kind. Compare with the Fibonacci numbers, A000045, whose terms are given by the Binet formula 1/sqrt(5)*( phi^n - (-1/phi)^n ).
a(n) = top right (or bottom left) entry of the 2 X 2 matrix T(n, M), where M is the 2 X 2 matrix [0, 1; 1, 1]; the off-diagonal elements of M^n give the sequence of Fibonacci numbers. Bottom right entry of the matrix T(n, M) gives A138574. See the remarks in A100047 for the general connection between Chebyshev polynomials and linear divisibility sequences of the fourth order. (End)
a(n) = (((phi + sqrt(phi))^n + (phi - sqrt(phi))^n)/2 - (-1)^n * cos(n*arctan(sqrt(phi))))/sqrt(5), where phi=(1+sqrt(5))/2. - Vladimir Reshetnikov, May 11 2016
a(n) = A143056(n+1)^2 + A272665(n+1)^2. - Vladimir Reshetnikov, Oct 05 2016
Limit_{n -> oo} a(n)/a(n-1) = A318605. - A.H.M. Smeets, Sep 12 2018

A060790 Inscribe two circles of curvature 2 inside a circle of curvature -1. Sequence gives curvatures of the smallest circles that can be sequentially inscribed in such a diagram.

Original entry on oeis.org

-1, 2, 2, 3, 15, 38, 110, 323, 927, 2682, 7754, 22403, 64751, 187134, 540822, 1563011, 4517183, 13054898, 37729362, 109039875, 315131087, 910745750, 2632104062, 7606921923, 21984412383, 63536130986, 183622826522, 530679817859, 1533693138351, 4432455434478
Offset: 0

Views

Author

Brian Galebach, Apr 26 2001

Keywords

Comments

The ratio of successive terms approaches the constant phi+sqrt(phi) ~= 2.89005363826396..., where phi is the golden ratio (sqrt(5)+1)/2. The ratio between the curvatures of two successively smaller circles approaches this constant in any apollonian packing as the curvatures increase.
For more comments, references and links, see A189226.

Examples

			After circles of 2, 2, 3, 15 have been inscribed in the diagram, the next smallest circle that can be inscribed has a curvature of 38.
		

Crossrefs

Programs

  • GAP
    a:=[-1,2,2,3];; for n in [5..30] do a[n]:=2*a[n-1]+2*a[n-2]+2*a[n-3]-a[n-4]; od; a; # Muniru A Asiru, Sep 12 2018
  • Maple
    seq(coeff(series((x-1)*(1-3*x-3*x^2)/(1-2*x-2*x^2-2*x^3+x^4),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Sep 12 2018
  • Mathematica
    CoefficientList[Series[(-3 z^3 + 4 z - 1)/(z^4 - 2 z^3 - 2 z^2 - 2 z + 1), {z, 0, 100}], z] (* and *) LinearRecurrence[{2, 2, 2, -1}, {-1, 2, 2, 3}, 100] (* Vladimir Joseph Stephan Orlovsky, Jul 03 2011 *)
  • PARI
    { for (n=0, 200, if (n>3, a=2*a1 + 2*a2 + 2*a3 - a4; a4=a3; a3=a2; a2=a1; a1=a, if (n==0, a=a4=-1, if (n==1, a=a3=2, if (n==2, a=a2=2, a=a1=3)))); write("b060790.txt", n, " ", a); ) } \\ Harry J. Smith, Jul 12 2009
    

Formula

a(n) = 2a(n-1) + 2a(n-2) + 2a(n-3) - a(n-4).
G.f.: -(1-x)*(1 - 3*x - 3*x^2)/(1 - 2*x - 2*x^2 - 2*x^3 + x^4). - Colin Barker, Apr 22 2012
Lim_{n -> inf} a(n)/a(n-1) = A318605. - A.H.M. Smeets, Sep 12 2018

Extensions

Corrected by T. D. Noe, Nov 08 2006

A071100 Expansion of (5 + 3*x + x^2 - x^3) / (1 - 2*x - 2*x^2 - 2*x^3 + x^4) in powers of x.

Original entry on oeis.org

5, 13, 37, 109, 313, 905, 2617, 7561, 21853, 63157, 182525, 527509, 1524529, 4405969, 12733489, 36800465, 106355317, 307372573, 888323221, 2567301757, 7419639785, 21443156953, 61971873769, 179102039257, 517614500173, 1495933669445, 4323328543981
Offset: 0

Views

Author

N. J. A. Sloane, May 28 2002

Keywords

Comments

Number of tilings of the 0-mod-4 pillow of order n is a perfect square times a(n). [Propp, 1999, p. 271]

Examples

			G.f. = 5 + 13*x + 37*x^2 + 109*x^3 + 313*x^4 + 905*x^5 + 2617*x^6 + 7561*x^7 + ...
		

References

  • J. Propp, Enumeration of matchings: problems and progress, pp. 255-291 in L. J. Billera et al., eds, New Perspectives in Algebraic Combinatorics, Cambridge, 1999 (see Problem 12).

Crossrefs

Cf. A112835.

Programs

  • GAP
    a:=[5,13,37,109];; for n in [5..30] do a[n]:=2*a[n-1]+2*a[n-2]+2*a[n-3]-a[n-4]; od; a; # Muniru A Asiru, Sep 12 2018
  • Maple
    seq(coeff(series((5+3*x+x^2-x^3)/(1-2*x-2*x^2-2*x^3+x^4),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Sep 12 2018
  • Mathematica
    CoefficientList[Series[(5 + 3*x + x^2 -x^3)/(1 - 2*x - 2*x^2 - 2*x^3 + x^4), {x, 0, 50}], x] (* Stefano Spezia, Sep 12 2018 *)
    LinearRecurrence[{2,2,2,-1},{5,13,37,109},30] (* Harvey P. Dale, Sep 03 2021 *)
  • PARI
    {a(n) = my(m = n+2); if( m < 0, m = -1 - m); polcoeff( (1 - x + x^2 - x^3) / (1 - 2*x - 2*x^2 - 2*x^3 + x^4) + x * O(x^m), m)}; /* Michael Somos, Dec 15 2011 */
    
  • PARI
    x='x+O('x^33); Vec((5+3*x+x^2-x^3)/(1-2*x-2*x^2-2*x^3+x^4)) \\ Altug Alkan, Sep 12 2018
    

Formula

G.f.: (5 + 3*x + x^2 -x^3) / (1 - 2*x - 2*x^2 - 2*x^3 + x^4).
a(-n) = a(-5 + n). a(-1) = a(-2) = 1. a(n) = 2*a(n-1) + 2*a(n-2) + 2*a(n-3) - a(n-4). - Michael Somos, Dec 15 2011
A112835(2*n + 2) = a(n).
Lim_{n -> inf} a(n)/a(n-1) = A318605. - A.H.M. Smeets, Sep 12 2018

A138574 a(n) = 2*a(n-1) + 2*a(n-2) + 2*a(n-3) - a(n-4); a(0)=0, a(1)=1, a(2)=3, a(3)=9, a(4)=25.

Original entry on oeis.org

0, 1, 3, 9, 25, 73, 211, 609, 1761, 5089, 14707, 42505, 122841, 355017, 1026019, 2965249, 8569729, 24766977, 71577891, 206863945, 597847897, 1727812489, 4993470771, 14431398369, 41707515361, 120536956513, 348358269715, 1006774084809, 2909631106713, 8408989965961
Offset: 0

Views

Author

Benoit Cloitre, May 12 2008

Keywords

Crossrefs

Cf. A071101.

Programs

  • Magma
    I:=[0,1,3,9,25]; [n le 5 select I[n] else 2*Self(n-1)+2*Self(n-2)+2*Self(n-3)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Sep 14 2018
  • Maple
    seq(coeff(series((x*(1+x+x^2-x^3))/(1-2*x-2*x^2-2*x^3+x^4),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Sep 12 2018
  • Mathematica
    LinearRecurrence[{2, 2, 2, -1}, {0, 1, 3, 9, 25}, 50] (* G. C. Greubel, Aug 08 2017 *)
    CoefficientList[Series[x*( 1+x+x^2-x^3 )/(1-2*x-2*x^2-2*x^3+x^4), {x, 0, 20}], x] (* Stefano Spezia, Sep 12 2018 *)
  • PARI
    x='x+O('x^50); concat([0], Vec(x*(1 +x +x^2 -x^3)/(1 -2*x -2*x^2 -2*x^3 +x^4))) \\ G. C. Greubel, Aug 08 2017
    

Formula

a(n) = round(w^n*(1 + 1/sqrt(5))/4) where w = (1+r)/(1-r) = 2.89005363826396... and r = sqrt(sqrt(5)-2) = 0.485868271756... .
G.f.: x*( 1 + x + x^2 - x^3 ) / ( 1 - 2*x - 2*x^2 - 2*x^3 + x^4 ). - R. J. Mathar, Jun 29 2013
Lim_{n -> inf} a(n)/a(n-1) = A318605. - A.H.M. Smeets, Sep 12 2018

Extensions

Terms corrected by Colin Barker, Jun 28 2013

A319129 Decimal expansion of (1 + sqrt(3) + sqrt(2*sqrt(3)))/2.

Original entry on oeis.org

2, 2, 9, 6, 6, 3, 0, 2, 6, 2, 8, 8, 6, 5, 3, 8, 2, 4, 5, 7, 0, 4, 9, 4, 1, 9, 1, 7, 7, 3, 6, 1, 7, 0, 2, 7, 1, 2, 2, 2, 6, 0, 6, 8, 5, 2, 5, 8, 2, 8, 4, 2, 6, 8, 9, 1, 2, 1, 8, 8, 0, 0, 0, 0, 8, 0, 4, 9, 2, 9, 9, 2, 2, 4, 5, 0, 3, 4, 8, 9, 8, 1
Offset: 0

Views

Author

A.H.M. Smeets, Sep 11 2018

Keywords

Comments

This constant and its reciprocal are the real solutions of x^4 - 2*x^3 - 2*x + 1 = (x^2 - (sqrt(3)+1)*x + 1)*(x^2 + (sqrt(3)-1)*x + 1) = 0.
Decimal expansion of the largest x satisfying x^2 - (1 + sqrt(3))*x + 1 = 0.

Examples

			2.29663026288653824570494191773617027122260685258284268912188000080492992...
		

Crossrefs

Cf. A318605.

Programs

  • Maple
    Digits:=100: evalf((1+sqrt(3)+sqrt(2*sqrt(3)))/2); # Muniru A Asiru, Sep 12 2018
  • Mathematica
    RealDigits[(1 + Sqrt[3] + Sqrt[2 Sqrt[3]])/2, 10, 100][[1]] (* Bruno Berselli, Sep 13 2018 *)
  • PARI
    (1+sqrt(3)+sqrt(2*sqrt(3)))/2 \\ Altug Alkan, Sep 11 2018

A038989 Expansion of (1 - x^2 - 2*x^3) / (1 - 2*x - 2*x^2 - 2*x^3 + x^4).

Original entry on oeis.org

1, 2, 5, 14, 41, 118, 341, 986, 2849, 8234, 23797, 68774, 198761, 574430, 1660133, 4797874, 13866113, 40073810, 115815461, 334712894, 967338217, 2795659334, 8079605429, 23350493066, 67484177441, 195032892538, 563655520661, 1628994688214, 4707882025385
Offset: 0

Views

Author

Keywords

Programs

  • GAP
    a:=[1,2,5,14];; for n in [5..30] do a[n]:=2*a[n-1]+2*a[n-2]+2*a[n-3]-a[n-4]; od; a; # Muniru A Asiru, Sep 12 2018
  • Maple
    seq(coeff(series((1-x^2-2*x^3)/(1-2*x-2*x^2-2*x^3+x^4),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Sep 12 2018
  • PARI
    Vec((1 - x^2 - 2*x^3) / (1 - 2*x - 2*x^2 - 2*x^3 + x^4) + O(x^30)) \\ Colin Barker, Jul 16 2017
    

Formula

a(n) = 2*a(n-1) + 2*a(n-2) + 2*a(n-3) - a(n-4) for n>3. - Colin Barker, Jul 16 2017
Lim_{n -> inf} a(n)/a(n-1) = A318605. - A.H.M. Smeets, Sep 12 2018

A045821 Numerical distance between m-th and (n+m)-th circles in a loxodromic sequence of circles in which each 4 consecutive circles touch.

Original entry on oeis.org

-1, 1, 1, 1, 7, 17, 49, 145, 415, 1201, 3473, 10033, 28999, 83809, 242209, 700001, 2023039, 5846689, 16897249, 48833953, 141132743, 407881201, 1178798545, 3406791025, 9845808799, 28454915537, 82236232177, 237667122001
Offset: 0

Views

Author

Keywords

References

  • Coxeter, H. S. M. "Numerical distances among the circles in a loxodromic sequence." Nieuw Archief voor Wiskunde 16 (1998): 1-10. (Note the word "circles" in the title!)

Crossrefs

Cf. A027674.

Programs

  • GAP
    a:=[-1,1,1,1];; for n in [5..30] do a[n]:=2*a[n-1]+2*a[n-2]+2*a[n-3]-a[n-4]; od; a; # Muniru A Asiru, Sep 12 2018
  • Maple
    with(combinat); F:=fibonacci;
    f:=n->add(F(n-i)*binomial(n,2*(i-2)), i=2..n-1);
    [seq(f(n),n=3..32)]; # Produces the sequence from a(3) onwards - N. J. A. Sloane, Sep 03 2018
  • Mathematica
    CoefficientList[Series[-(x^3-x^2-3*x+1)/(x^4-2*x^3-2*x^2-2*x+1), {x, 0, 30}], x] (* Stefano Spezia, Sep 12 2018 *)
  • PARI
    Vec(-(x^3-x^2-3*x+1)/(x^4-2*x^3-2*x^2-2*x+1) + O(x^100)) \\ Colin Barker, Sep 23 2013
    

Formula

a(n) = 2(a(n-1)+a(n-2)+a(n-3))-a(n-4).
a(n) = Sum{v=0 to [n/2]} binomial(n, 2v)*F(n-v-2) where F(m) is the m-th Fibonacci number.
G.f.: -(x^3-x^2-3*x+1) / (x^4-2*x^3-2*x^2-2*x+1). - Colin Barker, Sep 23 2013
Lim_{n -> inf} a(n)/a(n-1) = A318605. - A.H.M. Smeets, Sep 12 2018

Extensions

Reference and formulas from Floor van Lamoen
Showing 1-8 of 8 results.