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

A005246 a(n) = (1 + a(n-1)*a(n-2))/a(n-3), a(0) = a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 7, 11, 26, 41, 97, 153, 362, 571, 1351, 2131, 5042, 7953, 18817, 29681, 70226, 110771, 262087, 413403, 978122, 1542841, 3650401, 5757961, 13623482, 21489003, 50843527, 80198051, 189750626, 299303201, 708158977, 1117014753
Offset: 0

Views

Author

Keywords

Comments

For n >= 4 we have the linear recurrence a(n) = 4*a(n-2) - a(n-4). - Ahmed Fares (ahmedfares(AT)my-deja.com), Jun 04 2001
Integer solutions to the equation floor(sqrt(3)*x^2) = x*floor(sqrt(3)*x). - Benoit Cloitre, Mar 18 2004
For n > 2, a(n) is the smallest integer > a(n-1) such that sqrt(3)*a(n) is closer to and greater than an integer than sqrt(3)*a(n-1). I.e., a(n) is the smallest integer > a(n-1) such that frac(sqrt(3)*a(n)) < frac(sqrt(3)*a(n-1)). - Benoit Cloitre, Jan 20 2003
The lower principal and intermediate convergents to 3^(1/2), beginning with 1/1, 3/2, 5/3, 12/7, 19/11, form a strictly increasing sequence; essentially, numerators=A143643 and denominators=A005246. - Clark Kimberling, Aug 27 2008
This sequence is a particular case of the following situation: a(0)=1, a(1)=a, a(2)=b with the recurrence relation a(n+3)=(a(n+2)*a(n+1)+q)/a(n) where q is given in Z to have Q=(a*b^2+q*b+a+q)/(a*b) itself in Z. The g.f. is f: f(z)=(1+a*z+(b-Q)*z^2+(a*b+q-a*Q)*z^3)/(1-Q*z^2+z^4); so we have the linear recurrence: a(n+4)=Q*a(n+2)-a(n). The general form of a(n) is given by: a(2*m) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (b-Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p) and a(2*m+1) = a*Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (a*b+q-a*Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p). - Richard Choulet, Feb 24 2010
a(n) for n > 1 are the integer square roots of (floor(m^2/3)+1), where the values of m are given by A143643. Also see A082630. - Richard R. Forberg, Nov 14 2013
The a(n) = (1 + a(n-1)*a(n-2))/a(n-3) recursion has the Laurent property. If a(0), a(1), a(2) are variables, then a(n) is a Laurent polynomial (a rational function with a monomial denominator). - Michael Somos, Feb 27 2019

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 3*x^4 + 7*x^5 + 11*x^6 + 26*x^7 + 41*x^8 + ...
From _Richard Choulet_, Feb 24 2010: (Start)
a(4) = 4^2 - 4^0 - 3*4^1 = 3.
a(7) = 4^3 - 4*binomial(2,1) - 2*(4^2-1) = 26. (End)
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisections are A001835 and A001075.
Cf. A101265. Row sums of A211956.
Cf. A001353.

Programs

  • Haskell
    a005246 n = a005246_list !! n
    a005246_list = 1 : 1 : 1 : map (+ 1) (zipWith div
       (zipWith (*) (drop 2 a005246_list) (tail a005246_list)) a005246_list)
    -- Reinhard Zumkeller, Mar 07 2012
  • Maple
    A005246:=-(-1-z+2*z**2+z**3)/(1-4*z**2+z**4); # Conjectured by Simon Plouffe in his 1992 dissertation. Gives sequence except for one of the leading 1's.
    for q from 1 to 10 do :a:=1:b:=1:Q:=(a*b^2+q*b+a+q)/(a*b): for m from 0 to 15 do U(m):=sum((-1)^p*binomial(m-p,p)*Q^(m-2*p),p=0..floor(m/2))+(b-Q)*sum((-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p),p=0..floor((m-1)/2)):od: for m from 0 to 15 do V(m):=a*sum((-1)^p*binomial(m-p,p)*Q^(m-2*p),p=0..floor(m/2))+(a*b+q-a*Q)*sum((-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p),p=0..floor((m-1)/2)):od:for m from 0 to 15 do W(2*m):=U(m):od:for m from 0 to 14 do W(2*m+1):=V(m):od:seq(W(m),m=0..30):od; # Richard Choulet, Feb 24 2010
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==a[2]==1,a[n]==(1+a[n-1]a[n-2])/a[n-3]},a,{n,40}] (* Harvey P. Dale, May 28 2013 *)
    a[n_] := Cosh[(n-1)*ArcSinh[1/Sqrt[2]]]*If[EvenQ[n], Sqrt[2/3], 1]; Table[a[n] // FunctionExpand, {n, 0, 34}] (* Jean-François Alcover, Dec 10 2014, after Peter Bala *)
    a[ n_] := With[{m = If[ n < 0, 2 - n, n]}, SeriesCoefficient[ (1 + x - 3 x^2 - 2 x^3) / (1 - 4 x^2 + x^4), {x, 0, m}]]; (* Michael Somos, Feb 10 2017 *)
  • PARI
    {a(n) = if( n<0, n = 2 - n); polcoeff((1 + x - 3*x^2 - 2*x^3) / (1 - 4*x^2 + x^4) + x * O(x^n), n)}; /* Michael Somos, Nov 15 2006 */
    
  • PARI
    {a(n) = real( (2 + quadgen(12))^(n\2) * if( n%2, 1, 1 - 1 / quadgen(12)) )}; /* Michael Somos, May 24 2012 */
    

Formula

G.f.: (1 + x - 3*x^2 - 2*x^3)/(1 - 4*x^2 + x^4).
Limit_{n->oo} a(2n+1)/a(2n) = (3+sqrt(3))/3 = 1.5773502...; lim_{n->oo} a(2n)/a(2n-1) = (3+sqrt(3))/2 = 2.3660254.... - Benoit Cloitre, Aug 07 2002
A101265(n) = a(n)*a(n+1). - Franklin T. Adams-Watters, Apr 24 2006
a(n) = a(2-n) for all n in Z. - Michael Somos, Nov 15 2006
a(2*n + 1) = A001075(n). a(2*n) = A001835(n). a(2*n + 1) - a(2*n) = a(2*n + 2) - a(2*n + 1) = A001353(n). - Michael Somos, May 24 2012
For n > 2: a(n) = a(n-1) + Sum_{k=1..floor((n-1)/2)} a(2*k). - Reinhard Zumkeller, Dec 16 2007
From Richard Choulet, Feb 24 2010: (Start)
a(2*m) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*4^(m-2*p) - 3*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*4^(m-1-2*p).
a(2*m+1) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*4^(m-2*p) - 2*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*4^(m-1-2*p). (End)
From Tim Monahan, Jul 01 2011: (Start)
Closed form without extra leading 1: ((sqrt(6)+3)*(sqrt(2+sqrt(3))^n+(sqrt(2-sqrt(3))^n))+(3-sqrt(6))*((-sqrt(2+sqrt(3)))^n+(-sqrt(2-sqrt(3)))^n))/12.
Closed form with extra leading 1: ((6+3*sqrt(6)-2*sqrt(3)-3*sqrt(2))*(sqrt(2+sqrt(3))^n)+(6+3*sqrt(6)+2*sqrt(3)+3*sqrt(2))*(sqrt(2-sqrt(3))^n)+(6-3*sqrt(6)-2*sqrt(3)+3*sqrt(2))*((-sqrt(2+sqrt(3)))^n)+(6-3*sqrt(6)+2*sqrt(3)-3*sqrt(2))*((-sqrt(2-sqrt(3)))^n))/24. (End)
a(2*n+2) = Sum_{k = 0..n} 2^k*binomial(n+k,2*k); a(2*n+1) = Sum_{k = 0..n} n/(n+k)*2^k*binomial(n+k,2*k) for n >= 1. Row sums of A211956. - Peter Bala, May 01 2012
a(n) = ((sqrt(2)+sqrt(3)+(-1)^n*(sqrt(2)-sqrt(3)))*sqrt(2+(2-sqrt(3))^n*(2+ sqrt(3))-(-2+sqrt(3))*(2+ sqrt(3))^n))/(4*sqrt(3)). - Gerry Martens, Jun 06 2015
0 = a(n) - 2*a(n+1) + a(n+2) if n is even, 0 = a(n) - 3*a(n+1) + a(n+2) if n is odd for all n in Z. - Michael Somos, Feb 10 2017

Extensions

More terms from Michael Somos, Aug 01 2001

A208513 Triangle of coefficients of polynomials u(n,x) jointly generated with A111125; see the Formula section.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 9, 6, 1, 1, 16, 20, 8, 1, 1, 25, 50, 35, 10, 1, 1, 36, 105, 112, 54, 12, 1, 1, 49, 196, 294, 210, 77, 14, 1, 1, 64, 336, 672, 660, 352, 104, 16, 1, 1, 81, 540, 1386, 1782, 1287, 546, 135, 18, 1, 1, 100, 825, 2640, 4290, 4004, 2275, 800, 170, 20, 1
Offset: 1

Views

Author

Clark Kimberling, Feb 28 2012

Keywords

Comments

The columns of A208513 are identical to those of A208509. Here, however, the alternating row sums are periodic (with period 1,0,-2,-3,-2,0).
From Tom Copeland, Nov 07 2015: (Start)
These polynomials may be expressed in terms of the Faber polynomials of A263916, similar to A127677.
Rephrasing notes in A111125: Append an initial column of zeros except for a 1 at the top to A111125. Then the rows of this entry contain the partial sums of the column sequences of modified A111125; therefore, the difference of consecutive pairs of rows of this entry, modified by appending an initial row of zeros to it, generates the modified A111125. (End)

Examples

			First five rows:
  1;
  1,  1;
  1,  4,  1;
  1,  9,  6, 1;
  1, 16, 20, 8, 1;
First five polynomials u(n,x):
  u(1,x) = 1;
  u(2,x) = 1 +    x;
  u(3,x) = 1 +  4*x +    x^2;
  u(4,x) = 1 +  9*x +  6*x^2 +   x^3;
  u(5,x) = 1 + 16*x + 20*x^2 + 8*x^3 + x^4;
		

Crossrefs

Programs

  • Magma
    A208513:= func< n,k | k eq 1 select 1 else (2*(n-1)/(n+k-2))*Binomial(n+k-2, 2*k-2) >;
    [A208513(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Feb 02 2022
    
  • Mathematica
    (* First program *)
    u[1, x_]:=1; v[1, x_]:=1; z=16;
    u[n_, x_]:= u[n-1, x] + x*v[n-1, x];
    v[n_, x_]:= u[n-1, x] + (x+1)*v[n-1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n,z}];
    TableForm[cu]
    Flatten[%]  (* A208513 *)
    Table[Expand[v[n, x]], {n,z}]
    cv = Table[CoefficientList[v[n, x], x], {n,z}];
    TableForm[cv]
    Flatten[%]  (* A111125 *)
    (* Second program *)
    T[n_, k_]:= If[k==1, 1, ((n-1)/(k-1))*Binomial[n+k-3, 2*k-3]];
    Table[T[n, k], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Feb 02 2022 *)
  • Sage
    def A208513(n,k): return 1 if (k==1) else ((n-1)/(k-1))*binomial(n+k-3, 2*k-3)
    flatten([[A208513(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Feb 02 2022

Formula

Coefficients of u(n, x) from the mixed recurrence relations:
u(n,x) = u(n-1,x) + x*v(n-1,x),
v(n,x) = u(n-1,x) + (x+1)*v(n-1,x) + 1,
where u(1,x) = 1, u(2,x) = 1+x, v(1,x) = 1, v(2,x) = 3+x.
From Peter Bala, May 01 2012: (Start)
Working with an offset of 0: T(n,0) = 1; T(n,k) = (n/k)*binomial(n+k-1,2*k-1) = (n/k)*A078812(n,k) for k > 0. Cf. A156308.
O.g.f.: ((1-t)^2 + t^2*x)/((1-t)*((1-t)^2-t*x)) = 1 + (1+x)*t + (1+4*x+x^2)*t^2 + ....
u(n+1,x) = -1 + (b(2*n,x) + 1)/b(n,x), where b(n,x) = Sum_{k = 0..n} binomial(n+k, 2*k)*x^k are the Morgan-Voyce polynomials of A085478.
This triangle is formed from the even numbered rows of A211956 with a factor of 2^(k-1) removed from the k-th column entries.
(End)
T(n, k) = (2*(n-1)/(n+k-2))*binomial(n+k-2, 2*k-2). - G. C. Greubel, Feb 02 2022

A211955 Triangle of coefficients of a polynomial sequence related to the Morgan-Voyce polynomials A085478.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 6, 10, 4, 1, 10, 30, 28, 8, 1, 15, 70, 112, 72, 16, 1, 21, 140, 336, 360, 176, 32, 1, 28, 252, 840, 1320, 1056, 416, 64, 1, 36, 420, 1848, 3960, 4576, 2912, 960, 128, 1, 45, 660, 3696, 10296, 16016, 14560, 7680, 2176, 256
Offset: 0

Views

Author

Peter Bala, Apr 30 2012

Keywords

Comments

Let b(n,x) = Sum_{k = 0..n} binomial(n+k,2*k)*x^k denote the Morgan-Voyce polynomials of A085478. This triangle lists the coefficients (in ascending powers of x) of the related polynomial sequence R(n,x) := (1/2)*b(n,2*x) + 1/2. Several sequences already in the database are of the form (R(n,x))n>=0 for a fixed value of x. These include A101265 (x = 1), A011900 (x = 2), A182432 (x = 3), A054318 (x = 4) as well as signed versions of A133872 (x = -1), A109613(x = -2), A146983 (x = -3) and A084159 (x = -4).
The polynomials R(n,x) factorize in the ring Z[x] as R(n,x) = P(n,x)*P(n+1,x) for n >= 1: explicitly, P(2*n,x) = 1/2*(b(2*n,2*x) + 1)/b(n,2*x) and P(2*n+1,x) = b(n,2*x). The coefficients of P(n,x) occur in several tables in the database, although without the connection to the Morgan-Voyce polynomials being noted - see A211956 for more details. In terms of T(n,x), the Chebyshev polynomials of the first kind, we have P(2*n,x) = T(2*n,u) and P(2*n+1,x) = 1/u * T(2*n+1,u), where u = sqrt((x+2)/2). Hence R(n,x) = 1/u * T(n,u) * T(n+1,u).

Examples

			Triangle begins
.n\k.|..0....1....2....3....4....5....6
= = = = = = = = = = = = = = = = = = = =
..0..|..1
..1..|..1....1
..2..|..1....3....2
..3..|..1....6...10....4
..4..|..1...10...30...28....8
..5..|..1...15...70..112...72...16
..6..|..1...21..140..336..360..176...32
		

Crossrefs

Formula

T(n,0) = 1; T(n,k) = 2^(k-1)*binomial(n+k,2*k) for k > 0.
O.g.f. for column k (except column 0): 2^(k-1)*x^k/(1-x)^(2*k+1).
O.g.f.: (1-t*(x+2)+t^2)/((1-t)*(1-2*t(x+1)+t^2)) = 1 + (1+x)*t + (1+3*x+2*x^2)*t^2 + ....
Removing the first column from the triangle produces the Riordan array (x/(1-x)^3, 2*x/(1-x)^2).
The row polynomials R(n,x) := 1/2*b(n,2*x) + 1/2 = 1 + x*Sum_{k = 1..n} binomial(n+k,2*k)*(2*x)^(k-1).
Recurrence equation: R(n,x) = 2*(1+x)*R(n-1,x) - R(n-2,x) - x with initial conditions R(0,x) = 1, R(1,x) = 1+x.
Another recurrence is R(n,x)*R(n-2,x) = R(n-1,x)*(R(n-1,x) + x).
With P(n,x) as defined in the Comments section we have (x+2)/x - {Sum_{k = 0..2n} 1/R(k,x)}^2 = 2/(x*P(2*n+1,x)^2); (x+2)/x - {Sum_{k = 0..2n+1} 1/R(k,x)}^2 = (x+2)/(x*P(2*n+2,x)^2); consequently Sum_{k >= 0} 1/R(k,x) = sqrt((x+2)/x) for either x > 0 or x <= -2.
Row sums R(n,1) = A101265(n+1); Alt. row sums R(n,-1) = A133872(n+1);
R(n,2) = A011900(n); R(n,-2) = (-1)^n * A109613(n); R(n,3) = A182432;
R(n,-3) = (-1)^n * A146983(n); R(n,4) = A054318(n+1); R(n,-4) = (-1)^n * A084159(n).

A123519 Triangle read by rows: T(n,k) number of tilings of a 2n X 3 grid by dominoes, 2k of which are in a vertical position (0<=k<=n).

Original entry on oeis.org

1, 1, 2, 1, 6, 4, 1, 12, 20, 8, 1, 20, 60, 56, 16, 1, 30, 140, 224, 144, 32, 1, 42, 280, 672, 720, 352, 64, 1, 56, 504, 1680, 2640, 2112, 832, 128, 1, 72, 840, 3696, 7920, 9152, 5824, 1920, 256, 1, 90, 1320, 7392, 20592, 32032, 29120, 15360, 4352, 512, 1, 110, 1980, 13728, 48048, 96096, 116480, 87040, 39168, 9728, 1024
Offset: 0

Views

Author

Emeric Deutsch, Oct 16 2006

Keywords

Comments

Sum of terms in row n = A001835(n+1). Sum(k*T(n,k), k=0..n)=A123520(n) (n>=1).

Examples

			T(1,1)=2 because a 2 X 3 grid can be tiled in 2 ways with dominoes so that exactly 2 dominoes are in vertical position: place a horizontal domino above or below two adjacent vertical dominoes.
		

Crossrefs

Programs

  • Maple
    T:=(n,k)->2^k*binomial(n+k,2*k): for n from 0 to 10 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    Table[2^k*Binomial[n + k, 2*k], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, Oct 14 2017 *)
    CoefficientList[Table[Sqrt[2] Cosh[(2 n + 1) ArcSinh[Sqrt[x/2]]]/Sqrt[2 + x], {n, 0, 10}] // FunctionExpand // Simplify, x] // Flatten (* Eric W. Weisstein, Apr 04 2018 *)
    CoefficientList[Table[ChebyshevT[2 n - 1, Sqrt[1 + x/2]]/Sqrt[1 + x/2], {n, 10}], x] (* Eric W. Weisstein, Apr 04 2018 *)
  • PARI
    for(n=0,10, for(k=0,n, print1(2^k*binomial(n+k,2*k), ", "))) \\ G. C. Greubel, Oct 14 2017

Formula

T(n,k) = 2^k * binomial(n+k,2*k).
G.f.: (1-z)/(1 - 2*z + z^2 - 2*t*z).
Sum_{k=0..n} k*T(n,k) = A123520(n) (n>=1).
Row polynomials are b(n,2*x), where b(n,x) := Sum_{k = 0..n} binomial(n+k,2*k) * x^k are the Morgan-Voyce polynomials of A085478. The triangle is made up of the odd-indexed rows of A211956. - Peter Bala, May 01 2012

Extensions

Terms a(57) onward added by G. C. Greubel, Oct 14 2017

A211957 Triangle of coefficients of a polynomial sequence related to the Morgan-Voyce polynomials A085478.

Original entry on oeis.org

1, 1, 1, 1, 4, 2, 1, 9, 12, 4, 1, 16, 40, 32, 8, 1, 25, 100, 140, 80, 16, 1, 36, 210, 448, 432, 192, 32, 1, 49, 392, 1176, 1680, 1232, 448, 64, 1, 64, 672, 2688, 5280, 5632, 3328, 1024, 128, 1, 81, 1080, 5544, 14256, 20592, 17472, 8640, 2304, 256, 1, 100, 1650, 10560, 34320, 64064, 72800, 51200, 21760, 5120, 512
Offset: 0

Views

Author

Peter Bala, Apr 30 2012

Keywords

Comments

Triangle formed from the even numbered rows of A211956.
The coefficients of the Morgan-Voyce polynomials b(n,x) := sum {k = 0..n} binomial(n+k,2*k)*x^k are listed in A085478. The rational functions 1/2*(b(2*n,2*x) + 1)/b(n,2*x) turn out to be integer polynomials. Their coefficients are listed in this triangle. These polynomials occur as factors of the row polynomials R(n,x) of A211955.
This triangle appears to be the row reverse of the unsigned triangle |A204021|.

Examples

			Triangle begins
.n\k.|..0....1....2....3....4....5....6....7
= = = = = = = = = = = = = = = = = = = = = = =
..0..|..1
..1..|..1....1
..2..|..1....4....2
..3..|..1....9...12....4
..4..|..1...16...40...32....8
..5..|..1...25..100..140...80...16
..6..|..1...36..210..448..432..192...32
..7..|..1...49..392.1176.1680.1232..448...64
		

Crossrefs

Formula

T(n,0) = 1 and for k > 0, T(n,k) = n/k*2^(k-1)*binomial(n+k-1,2*k-1) = 2^(k-1)*A208513(n,k).
O.g.f.: ((1-t)-t*x)/((1-t)^2-2*t*x) = 1 + (1+x)*t + (1+4*x+2*x^2)*t^2 + ....
n-th row polynomial R(n,x) = 1/2*(b(2*n,2*x) + 1)/b(n,2*x) = T(2*n,u), where u = sqrt((x+2)/2) and T(n,u) denotes the Chebyshev polynomial of the first kind.
T(n,k) = 2*T(n-1,k)+2*T(n-1,k-1)-T(n-2,k), T(0,0)=T(1,0)=T(1,1)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Nov 16 2013
Showing 1-5 of 5 results.