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 49 results. Next

A007483 a(n) = 3*a(n-1) + 2*a(n-2), with a(0)=1, a(1)=5.

Original entry on oeis.org

1, 5, 17, 61, 217, 773, 2753, 9805, 34921, 124373, 442961, 1577629, 5618809, 20011685, 71272673, 253841389, 904069513, 3219891317, 11467812977, 40843221565, 145465290649, 518082315077, 1845177526529, 6571697209741, 23405446682281, 83359734466325, 296890096763537
Offset: 0

Views

Author

N. J. A. Sloane, Sep 19 1994

Keywords

Comments

Number of subsequences of [1,...,2n+1] in which each odd number has an even neighbor. The even neighbor must differ from the odd number by exactly 1.
From Gary W. Adamson, Aug 06 2016: (Start)
a(n) is the upper left term in the (n+1)-th matrix power of [(1,4); (1,2)] and is the INVERT transform of (1, 4, 4*2, 4*2^2, 4*2^3, 4*2^4, ...), i.e. of (1, 4, 8, 16, 32, 64, 128, ...).
The sequence is equal to row sums of an eigentriangle generated as follows: Let matrix A = an infinite lower triangle with (1, 4, 8, 16, ...) in every column and B = a triangle with (1, 1, 5, 17, 61, ...) as the rightmost diagonal and the rest zeros. Then the eigentriangle is A * B as follows: (1; 4, 1; 8, 4, 5; 16, 8, 20, 17; ...) with sums (1, 5, 17, 61, ...). Individual rows can be recovered by taking the dot product of (1, 4, 8, 16, ...) reversed and equal numbers of terms of(1, 1, 5, 17, ...). For example, 61 = (16, 8, 4, 1) dot (1, 1, 5, 17) = (16 + 8 + 20 + 17). (End)
The sequence is equal to A007482 convolved with (1, 2, 0, 0, 0, ...); i.e. (1 + 5x + 17x^2 + ...) = (1 + 3x + 11x^2 + 39x^3 + ...) * (1 + 2x). - Gary W. Adamson, Aug 08 2016
a(n) is the number of edge covers of the fan graph F(1,n+1) with a pendant attached to the vertex of degree n+1. - Feryal Alayont, Dec 08 2023

Examples

			a(2) = 17 = (8, 4, 1) dot (1, 1, 5) = 8 + 4 + 5. - _Gary W. Adamson_, Aug 06 2016
From _Feryal Alayont_, Dec 08 2023: (Start)
a(2) counts the edge covers of F(1,3) with a pendant attached at the vertex of degree 3. This is the graph:
      * -- *
    / | \
   /  |  \
  *---*---*
An edge cover is a subset of the edges where each vertex is an endpoint of at least one edge. We show a one-to-one correspondence between subsequences of [1,...,5] and edge covers. Label edges connecting the top left vertex to the bottom vertices with odd numbers, 1, 3, 5, left to right. Label bottom edges with 2 (left) and 4 (right). An odd number in the subsequence means that edge is not in the edge cover. An even number means that edge is in. All bottom vertices are covered because if an odd edge is missing, an even edge covers the vertex attached to that odd. The pendant edge must be in every cover, so that edge covers both top vertices. (End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a007483 n = a007483_list !! n
    a007483_list = 1 : 5 : zipWith (+)
                   (map (* 3) $ tail a007483_list) (map (* 2) a007483_list)
    -- Reinhard Zumkeller, Nov 02 2015
    
  • Magma
    [Floor((3/2+Sqrt(17)/2)^n*(1/2+7*Sqrt(17)/34)+(1/2-7*Sqrt(17)/34)*(3/2-Sqrt(17)/2)^n)+1: n in [0..30]]; // Vincenzo Librandi, Jul 09 2011
    
  • Mathematica
    LinearRecurrence[{3, 2}, {1, 5}, 24] (* Jean-François Alcover, Sep 26 2017 *)
    a[0]=1;a[1]=5;a[n_]:= a[n]= 3*a[n-1]+2*a[n-2];Table[a[n],{n,0,23}] (* James C. McMahon, Dec 17 2023 *)
  • PARI
    a(n)=([1,2;2,2]^n*[1,2]~*[1,2])[1,1] \\ Charles R Greathouse IV, Jul 10 2011
    
  • Sage
    @CachedFunction
    def a(n): return 5^n if (n<2) else 3*a(n-1) + 2*a(n-2)
    [a(n) for n in (0..40)] # G. C. Greubel, Jun 28 2021

Formula

G.f.: (1 + 2*x)/(1 - 3*x - 2*x^2).
a(n) = ((17 + 7*sqrt(17))/34)*((3 + sqrt(17))/2)^n* + ((17 - 7*sqrt(17))/34)*((3 - sqrt(17))/2)^n. - Paul Barry, Dec 08 2004
a(n-1) = Sum_{k=0..n} 2^(n-k)*A122542(n,k), n>=1. - Philippe Deléham, Oct 08 2006
a(n) = upper left term in the 2 X 2 matrix [1,2; 2,2]^(n+1). Also [a(n), a(n+1)] = the 2 X 2 matrix [0,1; 2,3]^(n+1) * [1,1]. Example: [0,1; 2,3]^4 * [1,1] = [61, 217]. - Gary W. Adamson, Mar 16 2008
Also, for n>=2, a(n)=[1,2;2,2]^(n-1)*[1,2]*[1,2]. - John M. Campbell, Jul 09 2011
a(n) = A007482(n) + 2*A007482(n-1). - R. J. Mathar, Sep 21 2012
a(n) = (i*sqrt(2))^(n-1)*( i*sqrt(2)*ChebyshevU(n, -3*i/(2*sqrt(2))) + 2*ChebyshevU(n-1, -3*i/(2*sqrt(2))) ). - G. C. Greubel, Jun 28 2021
E.g.f.: exp(3*x/2)*(17*cosh(sqrt(17)*x/2) + 7*sqrt(17)*sinh(sqrt(17)*x/2))/17. - Stefano Spezia, May 24 2024

Extensions

Definition simplified by N. J. A. Sloane, Aug 25 2014

A073387 Convolution triangle of A002605(n) (generalized (2,2)-Fibonacci), n>=0.

Original entry on oeis.org

1, 2, 1, 6, 4, 1, 16, 16, 6, 1, 44, 56, 30, 8, 1, 120, 188, 128, 48, 10, 1, 328, 608, 504, 240, 70, 12, 1, 896, 1920, 1872, 1080, 400, 96, 14, 1, 2448, 5952, 6672, 4512, 2020, 616, 126, 16, 1, 6688, 18192, 23040, 17856, 9352, 3444, 896, 160, 18, 1
Offset: 0

Views

Author

Wolfdieter Lang, Aug 02 2002

Keywords

Comments

The g.f. for the row polynomials P(n,x) = Sum_{m=0..n} T(n,m)*x^m is 1/(1-(2+x+2*z)*z). See Shapiro et al. reference and comment under A053121 for such convolution triangles.
T(n, k) is the number of words of length n over {0,1,2,3} having k letters 3 and avoiding runs of odd length for the letters 0,1. - Milan Janjic, Jan 14 2017

Examples

			Lower triangular matrix, T(n,k), n >= k >= 0, else 0:
    1;
    2,    1;
    6,    4,    1;
   16,   16,    6,    1;
   44,   56,   30,    8,   1;
  120,  188,  128,   48,  10,   1;
  328,  608,  504,  240,  70,  12,   1;
  896, 1920, 1872, 1080, 400,  96,  14,  1;
		

Crossrefs

Cf. A002605, A007482 (row sums), A053121, A073403, A073404.
Columns: A002605 (k=0), A073388 (k=1), A073389 (k=2), A073390 (k=3), A073391 (k=4), A073392 (k=5), A073393 (k=6), A073394 (k=7), A073397 (k=8), A073398 (k=9).

Programs

  • Magma
    A073387:= func< n,k | (&+[2^(n-k-j)*Binomial(n-j,k)*Binomial(n-k-j,j): j in [0..Floor((n-k)/2)]]) >;
    [A073387(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 03 2022
    
  • Maple
    T := (n,k) -> `if`(n=0,1,2^(n-k)*binomial(n,k)*hypergeom([(k-n)/2, (k-n+1)/2], [-n], -2)): seq(seq(simplify(T(n,k)),k=0..n),n=0..10); # Peter Luschny, Apr 25 2016
  • Mathematica
    T[n_, k_]:=T[n,k]=Sum[2^(n-k-j)*Binomial[n-j,k]*Binomial[n-k-j,j], {j,0,(n-k)/2}];
    Table[T[n,k], {n,0,10}, {k,0,n}]//Flatten (* Jean-François Alcover, Jun 04 2019 *)
  • SageMath
    def A073387(n,k): return sum(2^(n-k-j)*binomial(n-j,k)*binomial(n-k-j,j) for j in range(((n-k+2)//2)))
    flatten([[A073387(n,k) for k in range(n+1)] for n in range(12)]) # G. C. Greubel, Oct 03 2022

Formula

T(n, k) = 2*(p(k-1, n-k)*(n-k+1)*T(n-k+1) + q(k-1, n-k)*(n-k+2)*T(n-k))/(k!*12^k), n >= k >= 1, with T(n) = T(n, k=0) = A002605(n), else 0; p(m, n) = Sum_{j=0..m} A(m, j)*n^(m-j) and q(m, n) = Sum_{j=0..m} B(m, j)*n^(m-j) with the number triangles A(k, m) = A073403(k, m) and B(k, m) = A073404(k, m).
T(n, k) = Sum_{j=0..floor((n-k)/2)} 2^(n-k-j)*binomial(n-j, k)*binomial(n-k-j, j) if n > k, else 0.
T(n, k) = ((n-k+1)*T(n, k-1) + 2*(n+k)*T(n-1, k-1))/(6*k), n >= k >= 1, T(n, 0) = A002605(n+1), else 0.
Sum_{k=0..n} T(n, k) = A007482(n).
G.f. for column m (without leading zeros): 1/(1-2*x*(1+x))^(m+1), m>=0.
T(n,k) = 2^(n-k)*binomial(n,k)*hypergeom([(k-n)/2, (k-n+1)/2], [-n], -2) for n>=1. - Peter Luschny, Apr 25 2016
From G. C. Greubel, Oct 03 2022: (Start)
T(n, n-1) = A005843(n), n >= 1.
T(n, n-2) = 2*A005563(n-1), n >= 2.
T(n, n-3) = 4*A159920(n-1), n >= 2.
Sum_{k=0..n} (-1)^k*T(n, k) = A001045(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A015518(n+1). (End)

A367299 Triangular array T(n,k), read by rows: coefficients of strong divisibility sequence of polynomials p(1,x) = 1, p(2,x) = 2 + 5*x, p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where u = p(2,x), v = 1 - 2*x - x^2.

Original entry on oeis.org

1, 2, 5, 5, 18, 24, 12, 62, 126, 115, 29, 192, 545, 794, 551, 70, 567, 2040, 4114, 4716, 2640, 169, 1618, 7047, 17940, 28420, 26964, 12649, 408, 4508, 23020, 70582, 140988, 185122, 150122, 60605, 985, 12336, 72222, 258492, 620379, 1027368, 1156155, 819558, 290376
Offset: 1

Views

Author

Clark Kimberling, Dec 23 2023

Keywords

Comments

Because (p(n,x)) is a strong divisibility sequence, for each integer k, the sequence (p(n,k)) is a strong divisibility sequence of integers.

Examples

			First eight rows:
    1
    2    5
    5   18    24
   12   62   126   115
   29  192   545   794    551
   70  567  2040  4114   4716   2640
  169 1618  7047 17940  28420  26964  12649
  408 4508 23020 70582 140988 185122 150122 60605
Row 4 represents the polynomial p(4,x) = 12 + 62*x + 126*x^2 + 115*x^3, so (T(4,k)) = (12,62,126,115), k=0..3.
		

Crossrefs

Cf. A000129 (column 1); A004254 (p(n,n-1)); A186446 (row sums, p(n,1)); A007482 (alternating row sums, p(n,-1)); A041025 (p(n,-2)); A094440, A367208, A367209, A367210, A367211, A367297, A367298, A367300.

Programs

  • Mathematica
    p[1, x_] := 1; p[2, x_] := 2 + 5 x; u[x_] := p[2, x]; v[x_] := 1 - 2 x - x^2;
    p[n_, x_] := Expand[u[x]*p[n - 1, x] + v[x]*p[n - 2, x]]
    Grid[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]
    Flatten[Table[CoefficientList[p[n, x], x], {n, 1, 10}]]

Formula

p(n,x) = u*p(n-1,x) + v*p(n-2,x) for n >= 3, where p(1,x) = 1, p(2,x) = 2 + 5*x, u = p(2,x), and v = 1 - 2*x - x^2.
p(n,x) = k*(b^n - c^n), where k = -(1/sqrt(8 + 12*x + 21*x^2)), b = (1/2) (5*x + 2 + 1/k), c = (1/2) (5*x + 2 - 1/k).

A057089 Scaled Chebyshev U-polynomials evaluated at i*sqrt(6)/2. Generalized Fibonacci sequence.

Original entry on oeis.org

1, 6, 42, 288, 1980, 13608, 93528, 642816, 4418064, 30365280, 208700064, 1434392064, 9858552768, 67757668992, 465697330560, 3200729997312, 21998563967232, 151195763787264, 1039165966526976, 7142170381885440
Offset: 0

Views

Author

Wolfdieter Lang, Aug 11 2000

Keywords

Comments

a(n) gives the length of the word obtained after n steps with the substitution rule 0->1^6, 1->(1^6)0, starting from 0. The number of 1's and 0's of this word is 6*a(n-1) and 6*a(n-2), resp.

Crossrefs

Programs

Formula

a(n) = 6*a(n-1) + 6*a(n-2); a(0)=1, a(1)=6.
a(n) = S(n, i*sqrt(6))*(-i*sqrt(6))^n with S(n, x) := U(n, x/2), Chebyshev's polynomials of the 2nd kind, A049310.
G.f.: 1/(1-6*x-6*x^2).
a(n) = Sum_{k=0..n} 5^k*A063967(n,k). - Philippe Deléham, Nov 03 2006

A015537 Expansion of x/(1 - 5*x - 4*x^2).

Original entry on oeis.org

0, 1, 5, 29, 165, 941, 5365, 30589, 174405, 994381, 5669525, 32325149, 184303845, 1050819821, 5991314485, 34159851709, 194764516485, 1110461989261, 6331368012245, 36098688018269, 205818912140325, 1173489312774701, 6690722212434805
Offset: 0

Views

Author

Keywords

Comments

First differences give A122690(n) = {1, 4, 24, 136, 776, 4424, 25224, ...}. Partial sums of a(n) are {0, 1, 6, 35, 200, ...} = (A123270(n) - 1)/8. - Alexander Adamchuk, Nov 03 2006
For n >= 2, a(n) equals the permanent of the (n-1) X (n-1) tridiagonal matrix with 5's along the main diagonal, and 2's along the superdiagonal and the subdiagonal. - John M. Campbell, Jul 19 2011
Pisano period lengths: 1, 1, 8, 1, 4, 8, 48, 1, 24, 4, 40, 8, 42, 48, 8, 2, 72, 24, 360, 4, ... - R. J. Mathar, Aug 10 2012

Crossrefs

Programs

  • GAP
    a:=[0,1];; for n in [3..30] do a[n]:=5*a[n-1]+4*a[n-2]; od; a; # G. C. Greubel, Dec 26 2019
  • Magma
    [n le 2 select n-1 else 5*Self(n-1)+4*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 12 2012
    
  • Maple
    seq( simplify((2/I)^(n-1)*ChebyshevU(n-1, 5*I/4)), n=0..20); # G. C. Greubel, Dec 26 2019
  • Mathematica
    LinearRecurrence[{5,4}, {0,1}, 30] (* Vincenzo Librandi, Nov 12 2012 *)
    Table[2^(n-1)*Fibonacci[n, 5/2], {n, 0, 30}] (* G. C. Greubel, Dec 26 2019 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(x/(1-5*x-4*x^2))) \\ G. C. Greubel, Jan 01 2018
    
  • Sage
    [lucas_number1(n,5,-4) for n in range(0, 22)] # Zerinvary Lajos, Apr 24 2009
    

Formula

a(n) = 5*a(n-1) + 4*a(n-2).
a(n) = Sum_{k=0..floor((n-1)/2)} C(n-k-1, k)*4^k*5^(n-2*k-1). - Paul Barry, Apr 23 2005
a(n) = Sum_{k=0..(n-1)} A122690(k). - Alexander Adamchuk, Nov 03 2006
a(n) = 2^(n-1)*Fibonacci(n, 5/2) = (2/i)^(n-1)*ChebyshevU(n-1, 5*i/4). - G. C. Greubel, Dec 26 2019

A180140 Eight rooks and one berserker on a 3 X 3 chessboard. G.f.: (1+x+x^2)/(1-3*x-5*x^2).

Original entry on oeis.org

1, 4, 18, 74, 312, 1306, 5478, 22964, 96282, 403666, 1692408, 7095554, 29748702, 124723876, 522915138, 2192364794, 9191670072, 38536834186, 161568852918, 677390729684, 2840016453642, 11907003009346, 49921091296248
Offset: 0

Views

Author

Johannes W. Meijer, Aug 13 2010, Jun 15 2013

Keywords

Comments

a(n) gives the number of n-move routes of a fairy chess piece starting in a given side square (m = 2, 4, 6, 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a rook on the four side and four corner (m = 1, 3, 7, 9) squares but on the center square (m = 5) it goes berserk and turns into a berserker. For this sequence, the berserker can move to three of the side squares and three of the corners from the center.
The berserker is one of the Lewis chessmen which were discovered in 1831 on the Isle of Lewis. They are carved from walrus ivory in Scandinavian style of the 12th century. The pawns look like decorated tombstones. The pieces have all human representations with facial expressions varying from gloom to anger. Some of the rooks show men biting their shield in the manner of berserkers. According to Hooper and Whyld none looks happy.
Let A be the adjacency matrix of the graph G, where V(G) = {v1, v2, v3, v4, v5, v6, v7, v8, v9}. Then the (m, k) entry of A^n is the number of different vm-vk walks of length n in G, see the Chartrand reference. In the adjacency matrix A, see the Maple program, the A[1], A[3], A[7] and A[9] vectors represent the rook moves on the corner squares, the A[2], A[4], A[6] and A[8] vectors represent the rook moves on the side squares and the A[5] vector represents the moves of the berserker. On a 3 X 3 chessboard there are 2^9 = 512 ways a berserker could move from the center square (off the center the berserker behaves like a rook) so there are 512 different berserkers.
For the side squares the 512 berserker vectors lead to 42 different sequences, see the overview of berserker sequences. There are 16 berserker vectors that lead to the sequence given above. Their decimal [binary] values are: 111 [001 101 111] , 207 [011 001 111], 231 [011 100 111], 237 [011 101 101], 303 [100 101 111], 363 [101 101 011], 366 [101 101 110], 399 [110 001 111], 423 [110 100 111], 429 [110 101 101], 459 [111 001 011], 462 [111 001 110], 483 [111 100 011], 486 [111 100 110], 489 [111 101 001] and 492 [111 101 100]. These berserker vectors lead for the corner squares to sequence 4*A179606 (with leading term 1 added) and for the central square to sequence 6*A179606 (with leading term 1 added).
This sequence belongs to a family of sequences with GF(x)=(1+x-k*x^2)/(1-3*x+(k-4)*x^2), see A180142.

References

  • Gary Chartrand, Introductory Graph Theory, pp. 217-221, 1984.
  • David Hooper and Kenneth Whyld, The Oxford Companion to Chess, pp. 131, 225, 1992.

Crossrefs

Cf. A180141 (corner squares) and A180147 (central square).
Cf. Berserker sequences side squares: 4*A007482 (with leading 1 added), A180144, A003500 (n>=1 and a(0)=1), A180142, A000302, A180140 (this sequence), 2*A001077 (n>=1 and a(0)=1), A180146, 4*A154964 (n>=1 and a(0)=1), 4*A123347 (with leading 1 added).

Programs

  • Maple
    nmax:=22; m:=2; A[1]:=[0, 1, 1, 1, 0, 0, 1, 0, 0]: A[2]:=[1, 0, 1, 0, 1, 0, 0, 1, 0]: A[3]:= [1, 1, 0, 0, 0, 1, 0, 0, 1]: A[4]:= [1, 0, 0, 0, 1, 1, 1, 0, 0]: A[5]:=[0, 0, 1, 1, 0, 1, 1, 1, 1]: A[6]:=[0, 0, 1, 1, 1, 0, 0, 0, 1]: A[7]:=[1, 0, 0, 1, 0, 0, 0, 1, 1]: A[8]:=[0, 1, 0, 0, 1, 0, 1, 0, 1]: A[9]:=[0, 0, 1, 0, 0, 1, 1, 1, 0]: A:= Matrix([A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[8], A[9]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m, k], k=1..9): od: seq(a(n), n=0..nmax);
  • Mathematica
    CoefficientList[Series[(1+x+x^2)/(1-3*x-5*x^2), {x, 0, 22}],x] (* or *) LinearRecurrence[{3,5,0},{1,4,18},23] (* Indranil Ghosh, Mar 05 2017 *)
  • PARI
    print(Vec((1 + x + x^2)/(1- 3*x - 5*x^2) + O(x^23))); \\ Indranil Ghosh, Mar 05 2017

Formula

G.f.: (1+x+x^2)/(1-3*x-5*x^2).
a(n) = 3*a(n-1) + 5*a(n-2) for n>=3 with a(0)=1, a(1)=4 and a(2)=18.
a(n) = ((22+54*A)*A^(-n-1) + (22+54*B)*B^(-n-1))/145 with A=(-3+sqrt(29))/10 and B=(-3-sqrt(29))/10 for n>=1 with a(0)=1.
5*a(n) = 2*( A015523(n) + 3*A015523(n+1)), n>0 - R. J. Mathar, May 11 2013

A104934 Expansion of (1-x)/(1 - 3*x - 2*x^2).

Original entry on oeis.org

1, 2, 8, 28, 100, 356, 1268, 4516, 16084, 57284, 204020, 726628, 2587924, 9217028, 32826932, 116914852, 416398420, 1483024964, 5281871732, 18811665124, 66998738836, 238619546756, 849856117940, 3026807447332, 10780134577876, 38394018628292, 136742325040628, 487015012378468, 1734529687216660
Offset: 0

Views

Author

Creighton Dement, Mar 29 2005

Keywords

Comments

A floretion-generated sequence relating A007482, A007483, A007484. Inverse is A046717. Inverse of Fibonacci(3n+1), A033887. Binomial transform is A052984. Inverse binomial transform is A006131. Note: the conjectured relation 2*a(n) = A007482(n) + A007483(n-1) is a result of the FAMP identity dia[I] + dia[J] + dia[K] = jes + fam
Floretion Algebra Multiplication Program, FAMP Code: 1dia[I]tesseq[A*B] with A = - .25'i + .25'j + .25'k - .25i' + .25j' + .25k' - .25'ii' + .25'jj' + .25'kk' + .25'ij' + .25'ik' + .25'ji' + .25'jk' + .25'ki' + .25'kj' - .25e and B = + 'i + i' + 'ji' + 'ki' + e
a(n) is also the number of ways to build a (2 x 2 x n)-tower using (2 X 1 X 1)-bricks (see Exercise 3.15 in Aigner's book). - Vania Mascioni (vmascioni(AT)bsu.edu), Mar 09 2009
a(n) is the number of compositions of n when there are 2 types of 1 and 4 types of other natural numbers. - Milan Janjic, Aug 13 2010
Pisano period lengths: 1, 1, 4, 1, 24, 4, 48, 1, 12, 24, 30, 4, 12, 48, 24, 1,272, 12, 18, 24, ... - R. J. Mathar, Aug 10 2012

References

  • M. Aigner, A Course in Enumeration, Springer, 2007, p.103.

Crossrefs

Programs

  • Julia
    # Following the Pari implementation.
    function a(n)
       F = BigInt[0 1; 2 3]
       Fn = F^n * [1; 2]
       Fn[1, 1]
    end # Peter Luschny, Jan 06 2019
    
  • Magma
    m:=35; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1 - x)/(1 - 3*x - 2*x^2)); // Vincenzo Librandi, Jul 13 2018
    
  • Maple
    a := proc(n) option remember; `if`(n < 2, [1, 2][n+1], (3*a(n-1) + 2*a(n-2))) end:
    seq(a(n), n=0..28); # Peter Luschny, Jan 06 2019
  • Mathematica
    LinearRecurrence[{3, 2}, {1, 2}, 40] (* Vincenzo Librandi, Jul 13 2018 *)
    CoefficientList[Series[(1-x)/(1-3x-2x^2),{x,0,40}],x] (* Harvey P. Dale, May 02 2019 *)
  • PARI
    a(n)=([0,1; 2,3]^n*[1;2])[1,1] \\ Charles R Greathouse IV, Jun 20 2015
    
  • SageMath
    [(i*sqrt(2))^(n-1)*(i*sqrt(2)*chebyshev_U(n, -3*i/(2*sqrt(2))) - chebyshev_U(n-1, -3*i/(2*sqrt(2))) ) for n in (0..40)] # G. C. Greubel, Jun 27 2021

Formula

Define A007483(-1) = 1. Then 2*a(n) = A007482(n) + A007483(n-1) (conjecture);
a(n+2) = 4*A007484(n) (thus 8*A007484(n) = A007482(n+2) + A007483(n+1));
a(n+1) = 2*A055099(n);
a(n+2) - a(n+1) - a(n) = A007484(n+1) - A007484(n).
a(0)=1, a(1)=2, a(n) = 3*a(n-1) + 2*a(n-2) for n > 1. - Philippe Deléham, Sep 19 2006
a(n) = Sum_{k=0..n} 2^k*A122542(n,k). - Philippe Deléham, Oct 08 2006
a(n) = ((17+sqrt(17))/34)*((3+sqrt(17))/2)^n + ((17-sqrt(17))/34)*((3-sqrt(17))/2)^n. - Richard Choulet, Nov 19 2008
a(n) = 2*a(n-1) + 4*Sum_{k=0..n-2} a(k) for n > 0. - Vania Mascioni (vmascioni(AT)bsu.edu), Mar 09 2009
G.f.: (1-x)/(1-3*x-2*x^2). - M. F. Hasler, Jul 12 2018
a(n) = (i*sqrt(2))^(n-1)*( i*sqrt(2)*ChebyshevU(n, -3*i/(2*sqrt(2))) - ChebyshevU(n-1, -3*i/(2*sqrt(2))) ). - G. C. Greubel, Jun 27 2021
E.g.f.: exp(3*x/2)*(sqrt(17)*cosh(sqrt(17)*x/2) + sinh(sqrt(17)*x/2))/sqrt(17). - Stefano Spezia, May 24 2024

A180226 a(n) = 4*a(n-1) + 10*a(n-2), with a(1)=0 and a(2)=1.

Original entry on oeis.org

0, 1, 4, 26, 144, 836, 4784, 27496, 157824, 906256, 5203264, 29875616, 171535104, 984896576, 5654937344, 32468715136, 186424233984, 1070384087296, 6145778689024, 35286955629056, 202605609406464, 1163291993916416, 6679224069730304, 38349816218085376
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[0,1]; [n le 2 select I[n] else 4*Self(n-1) + 10*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 16 2018
  • Mathematica
    Join[{a=0,b=1},Table[c=4*b+10*a;a=b;b=c,{n,100}]]
    LinearRecurrence[{4,10}, {0,1}, 30] (* G. C. Greubel, Jan 16 2018 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(x^2/(1-4*x-10*x^2))) \\ G. C. Greubel, Jan 16 2018
    

Formula

a(n) = ((2+sqrt(14))^(n-1) - (2-sqrt(14))^(n-1))/(2*sqrt(14)). - Rolf Pleisch, May 14 2011
G.f.: x^2/(1-4*x-10*x^2).

A206776 a(n) = 3*a(n-1) + 2*a(n-2) for n>1, a(0)=2, a(1)=3.

Original entry on oeis.org

2, 3, 13, 45, 161, 573, 2041, 7269, 25889, 92205, 328393, 1169589, 4165553, 14835837, 52838617, 188187525, 670239809, 2387094477, 8501763049, 30279478101, 107841960401, 384084837405, 1367938433017, 4871984973861, 17351831787617, 61799465310573
Offset: 0

Views

Author

Bruno Berselli, Jan 10 2013

Keywords

Comments

This is the Lucas sequence V(3,-2).
Inverse binomial transform of this sequence is A072265.
a(n) = A124805(n) - 1 for n>0.

Examples

			G.f. = 2 + 3*x + 13*x^2 + 45*x^3 + 161*x^4 + 573*x^5 + 2041*x^6 + 7269*x^7 + ...
		

References

  • Ronald L. Graham, Donald E. Knuth, Oren Patashnik, Concrete Mathematics, 2nd ed., Addison-Wesley, 1994. Exercise 7.49(c), pages 379, 573.

Crossrefs

Cf. A189736 (same recurrence but with initial values reversed).

Programs

  • Magma
    [n le 1 select n+2 else 3*Self(n)+2*Self(n-1): n in [0..25]];
    
  • Maple
    A206776 := proc(n)
        option remember ;
        if n <= 1 then
            n+2 ;
        else
            3*procname(n-1)+2*procname(n-2) ;
        end if;
    end proc:
    seq(A206776(n),n=0..30) ; # R. J. Mathar, Feb 18 2024
  • Mathematica
    RecurrenceTable[{a[n] == 3 a[n - 1] + 2 a[n - 2], a[0] == 2, a[1] == 3}, a[n], {n, 25}]
    LinearRecurrence[{3,2},{2,3},30] (* Harvey P. Dale, Apr 29 2014 *)
    a[ n_] := If[ n < 0, (-2)^n a[ -n], ((3 + Sqrt[17])/2)^n + ((3 - Sqrt[17])/2)^n // Expand]; (* Michael Somos, Oct 13 2016 *)
    a[ n_] := If[ n < 0, (-2)^n a[ -n], Boole[n == 0] + SeriesCoefficient[ ((1 + 3*x + Sqrt[1 + 6*x + 17*x^2])/2)^n, {x, 0, n}]]; (* Michael Somos, Oct 13 2016 *)
  • Maxima
    a[0]:2$ a[1]:3$ a[n]:=3*a[n-1]+2*a[n-2]$ makelist(a[n], n, 0, 25);
    
  • PARI
    Vec((2-3*x)/(1-3*x-2*x^2) + O(x^30)) \\ Michel Marcus, Jun 26 2015
    
  • PARI
    {a(n) = 2 * real(( (3 + quadgen(68)) / 2 )^n)}; /* Michael Somos, Oct 13 2016 */
    
  • PARI
    {a(n) = my(w = quadgen(-8)); simplify(w^n * subst(2 * polchebyshev(n), x, -3/4*w))}; /* Michael Somos, Oct 13 2016 */
    
  • PARI
    for(n=0,25,print1(round(((3+sqrt(17))/2)^n+((3-sqrt(17))/2)^n),", ")) \\ Hugo Pfoertner, Nov 19 2018

Formula

G.f.: (2-3*x)/(1-3*x-2*x^2).
a(n) = ((3-sqrt(17))^n+(3+sqrt(17))^n)/2^n.
a(n) = [x^n] ( (1 + 3*x + sqrt(1 + 6*x + 17*x^2))/2 )^n for n >= 1. - Peter Bala, Jun 23 2015
a(n) = (-2)^n * a(-n) for all n in Z. - Michael Somos, Oct 13 2016
If c = (3 + sqrt(17))/2, then c^n = (a(n) + sqrt(17)*A007482(n-1)) / 2. - Michael Somos, Oct 13 2016
E.g.f.: 2*exp(3*x/2)*cosh(sqrt(17)*x/2). - Stefano Spezia, Oct 21 2022
a(n) = 2*A007482(n)-3*A007482(n-1). - R. J. Mathar, Feb 18 2024

A285397 Start with a single cell at coordinates (0, 0, 0), then iteratively subdivide the grid into 3 X 3 X 3 cells and remove the cells whose sum of modulo 2 coordinates is 3; a(n) is the number of cells after n iterations.

Original entry on oeis.org

1, 26, 646, 15818, 385822, 9401330, 229023958, 5578844858, 135894050926, 3310204057250, 80632220390758, 1964094376340522, 47842741143064894, 1165385872796078546, 28387257791866411894, 691476036231391881242, 16843441238514542846350, 410283940250387099210114
Offset: 0

Views

Author

Peter Karpov, Apr 23 2017

Keywords

Comments

Cell configuration converges to a fractal with dimension 2.906...

Crossrefs

Programs

  • Magma
    I:=[1, 26, 646]; [n le 3 select I[n] else 32*Self(n-1) - 195*Self(n-2) + 216*Self(n-3) : n in [1..41]]; // G. C. Greubel, Dec 09 2021
  • Mathematica
    LinearRecurrence[{32, -195, 216}, {1, 26, 646}, 18]
  • PARI
    Vec((1 - 3*x)^2 / (1 - 32*x + 195*x^2 - 216*x^3) + O(x^20)) \\ Colin Barker, Apr 23 2017
    
  • Sage
    def A285397_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-6*x+9*x^2)/(1-32*x+195*x^2-216*x^3) ).list()
    A285397_list(40) # G. C. Greubel, Dec 09 2021
    

Formula

a(0) = 1, a(1) = 26, a(2) = 646, a(n) = 28*a(n-1) - 195*a(n-2) + 216*a(n-3).
G.f.: (1-6*x+9*x^2)/(1-32*x+195*x^2-216*x^3).
Previous Showing 11-20 of 49 results. Next