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.

A122542 Triangle T(n,k), 0 <= k <= n, read by rows, given by [0, 2, -1, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 2, 4, 1, 0, 2, 8, 6, 1, 0, 2, 12, 18, 8, 1, 0, 2, 16, 38, 32, 10, 1, 0, 2, 20, 66, 88, 50, 12, 1, 0, 2, 24, 102, 192, 170, 72, 14, 1, 0, 2, 28, 146, 360, 450, 292, 98, 16, 1, 0, 2, 32, 198, 608, 1002, 912, 462, 128, 18, 1
Offset: 0

Views

Author

Philippe Deléham, Sep 19 2006, May 28 2007

Keywords

Comments

Riordan array (1, x*(1+x)/(1-x)). Rising and falling diagonals are the tribonacci numbers A000213, A001590.

Examples

			Triangle begins:
  1;
  0, 1;
  0, 2,  1;
  0, 2,  4,   1;
  0, 2,  8,   6,   1;
  0, 2, 12,  18,   8,    1;
  0, 2, 16,  38,  32,   10,   1;
  0, 2, 20,  66,  88,   50,  12,   1;
  0, 2, 24, 102, 192,  170,  72,  14,   1;
  0, 2, 28, 146, 360,  450, 292,  98,  16,  1;
  0, 2, 32, 198, 608, 1002, 912, 462, 128, 18, 1;
		

Crossrefs

Other versions: A035607, A113413, A119800, A266213.
Sums include: A000007, A001333 (row), A001590 (diagonal), A007483, A057077 (signed row), A078016 (signed diagonal), A086901, A091928, A104934, A122558, A122690.

Programs

  • Haskell
    a122542 n k = a122542_tabl !! n !! k
    a122542_row n = a122542_tabl !! n
    a122542_tabl = map fst $ iterate
       (\(us, vs) -> (vs, zipWith (+) ([0] ++ us ++ [0]) $
                          zipWith (+) ([0] ++ vs) (vs ++ [0]))) ([1], [0, 1])
    -- Reinhard Zumkeller, Jul 20 2013, Apr 17 2013
    
  • Magma
    function T(n, k) // T = A122542
      if k eq 0 then return 0^n;
      elif k eq n then return 1;
      else return T(n-1,k) + T(n-1,k-1) + T(n-2,k-1);
      end if;
    end function;
    [T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 27 2024
  • Mathematica
    CoefficientList[#, y]& /@ CoefficientList[(1-x)/(1 - (1+y)x - y x^2) + O[x]^11, x] // Flatten (* Jean-François Alcover, Sep 09 2018 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[k==n, 1, If[k==0, 0, T[n-1,k-1] +T[n-1,k] +T[n-2,k- 1] ]]; (* T = A122542 *)
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 27 2024 *)
  • Sage
    def A122542_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return prec(n-1,k-1)+2*sum(prec(n-i,k-1) for i in (2..n-k+1))
        return [prec(n, k) for k in (0..n)]
    for n in (0..10): print(A122542_row(n)) # Peter Luschny, Mar 16 2016
    

Formula

Sum_{k=0..n} x^k*T(n,k) = A000007(n), A001333(n), A104934(n), A122558(n), A122690(n), A091928(n) for x = 0, 1, 2, 3, 4, 5. - Philippe Deléham, Jan 25 2012
Sum_{k=0..n} 3^(n-k)*T(n,k) = A086901(n).
Sum_{k=0..n} 2^(n-k)*T(n,k) = A007483(n-1), n >= 1. - Philippe Deléham, Oct 08 2006
T(2*n, n) = A123164(n).
T(n, k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k-1), n > 1. - Philippe Deléham, Jan 25 2012
G.f.: (1-x)/(1-(1+y)*x-y*x^2). - Philippe Deléham, Mar 02 2012
From G. C. Greubel, Oct 27 2024: (Start)
Sum_{k=0..n} (-1)^k*T(n, k) = A057077(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A001590(n+1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = A078016(n). (End)

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

A180028 Eight white queens and one red queen on a 3 X 3 chessboard. G.f.: (1 + 3*x)/(1 - 6*x - 3*x^2).

Original entry on oeis.org

1, 9, 57, 369, 2385, 15417, 99657, 644193, 4164129, 26917353, 173996505, 1124731089, 7270376049, 46996449561, 303789825513, 1963728301761, 12693739287105, 82053620627913, 530402941628793, 3428578511656497
Offset: 0

Views

Author

Johannes W. Meijer, Aug 09 2010; edited Jun 21 2013

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in the center square (m = 5) on a 3 X 3 chessboard. This fairy chess piece behaves like a white queen on the eight side and corner squares but on the central square the queen explodes with fury and turns into a red queen.
On a 3 X 3 chessboard there are 2^9 = 512 ways to explode with fury on the center square (off the center square the piece behaves like a normal queen). The red queen is represented by the A[5] vector in the fifth row of the adjacency matrix A, see the Maple program and A180140. For the center square the 512 red queens lead to 17 red queen sequences, see the overview of red queen sequences and the crossreferences.
The sequence above corresponds to just one red queen vector, i.e., A[5] = [111 111 111] vector. The other squares lead for this vector to A090018.
This sequence belongs to a family of sequences with g.f. (1+k*x)/(1 - 6*x - k*x^2). The members of this family that are red queen sequences are A180028 (k=3; this sequence), A180029 (k=2), A015451 (k=1), A000400 (k=0), A001653 (k=-1), A180034 (k=-2), A084120 (k=-3), A154626 (k=-4) and A000012 (k=-5). Other members of this family are A123362 (k=5), 6*A030192(k=-6).
Inverse binomial transform of A107903.

References

  • Gary Chartrand, Introductory Graph Theory, pp. 217-221, 1984.

Crossrefs

Cf. A180140 (berserker sequences)
Cf. A180032 (Corner and side squares).
Cf. Red queen sequences center square [decimal value A[5]]: A180028 [511], A180029 [255], A180031 [495], A015451 [127], A152240 [239], A000400 [63], A057088 [47], A001653 [31], A122690 [15], A180034 [23], A180036 [7], A084120 [19], A180038 [3], A154626 [17], A015449 [1], A000012 [16], A000007 [0].

Programs

  • Magma
    I:=[1,9]; [n le 2 select I[n] else 6*Self(n-1)+3*Self(n-2): n in [1..20]]; // Vincenzo Librandi, Nov 15 2011
  • Maple
    nmax:=19; m:=5; A[1]:=[0,1,1,1,1,0,1,0,1]: A[2]:=[1,0,1,1,1,1,0,1,0]: A[3]:=[1,1,0,0,1,1,1,0,1]: A[4]:=[1,1,0,0,1,1,1,1,0]: A[5]:=[1,1,1,1,1,1,1,1,1]: A[6]:=[0,1,1,1,1,0,0,1,1]: A[7]:=[1,0,1,1,1,0,0,1,1]: A[8]:=[0,1,0,1,1,1,1,0,1]: A[9]:=[1,0,1,0,1,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
    LinearRecurrence[{6,3},{1,9},50] (* Vincenzo Librandi, Nov 15 2011 *)

Formula

G.f.: (1+3*x)/(1 - 6*x - 3*x^2).
a(n) = 6*a(n-1) + 3*a(n-2) with a(0) = 1 and a(1) = 9.
a(n) = ((1-A)*A^(-n-1) + (1-B)*B^(-n-1))/4 with A=(-1+2*sqrt(3)/3) and B=(-1-2*sqrt(3)/3).
Lim_{k->infinity} a(n+k)/a(k) = (-1)^(n-1)*A108411(n+1)/(A041017(n-1)*sqrt(12) - A041016(n-1)) for n >= 1.

A180031 Number of n-move paths on a 3 X 3 chessboard of a queen starting or ending in the central square.

Original entry on oeis.org

1, 8, 48, 304, 1904, 11952, 74992, 470576, 2952816, 18528688, 116265968, 729559344, 4577924464, 28726097072, 180253881072, 1131078181936, 7097421958256, 44535735246768, 279458051899888, 1753576141473584
Offset: 0

Views

Author

Johannes W. Meijer, Aug 09 2010

Keywords

Comments

The a(n) represent the number of n-move paths of a chess queen starting or ending in the central square (m = 5) on a 3 X 3 chessboard. The other squares lead to A180030.
To determine the a(n) we can either sum the components of the column vector A^n[k,m], with A the adjacency matrix of the queen's graph, or we can sum the components of the row vector A^n[m,k], see the Maple program.
Closely related with this sequence are the red queen sequences, see A180028 and A180032.
This sequence belongs to a family of sequences with g.f. (1+k*x)/(1 - 5*x - (k+5)*x^2). The members of this family that are red queen sequences are A180031 (k=3; this sequence), A152240 (k=2), A000400 (k=1), A057088 (k=0), A122690 (k=-1), A180036 (k=-2), A180038 (k=-3), A015449 (k=-4) and A000007 (k=-5). Other members of this family are A030221 (k= -6), 3*A109114 (k=-8), 4*A020989 (k=-9), 6*A166060 (k=-11).

Programs

  • Magma
    I:=[1,8]; [n le 2 select I[n] else 5*Self(n-1)+8*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
  • Maple
    with(LinearAlgebra): nmax:=19; m:=5; A[5]:= [1,1,1,1,0,1,1,1,1]: A:=Matrix([[0,1,1,1,1,0,1,0,1], [1,0,1,1,1,1,0,1,0], [1,1,0,0,1,1,1,0,1], [1,1,0,0,1,1,1,1,0], A[5], [0,1,1,1,1,0,0,1,1], [1,0,1,1,1,0,0,1,1], [0,1,0,1,1,1,1,0,1], [1,0,1,0,1,1,1,1,0]]): 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
    LinearRecurrence[{5,8},{1,8},50] (* Vincenzo Librandi, Nov 15 2011 *)

Formula

G.f.: (1+3*x)/(1 - 5*x - 8*x^2).
a(n) = 5*a(n-1) + 8*a(n-2) with a(0) = 1 and a(1) = 8.
a(n) = ((A+11)*A^(-n-1) + (B+11)*B^(-n-1))/57 with A = (-5+sqrt(57))/16 and B = (-5-sqrt(57))/16.

A210636 Riordan array ((1-x)/(1-2*x-x^2), x*(1+x)/(1-2*x-x^2)).

Original entry on oeis.org

1, 1, 1, 3, 4, 1, 7, 13, 7, 1, 17, 40, 32, 10, 1, 41, 117, 124, 60, 13, 1, 99, 332, 437, 286, 97, 16, 1, 239, 921, 1447, 1193, 553, 143, 19, 1, 577, 2512, 4584, 4556, 2682, 952, 198, 22, 1, 1393, 6761, 14048, 16336, 11666, 5282, 1510, 262, 25, 1
Offset: 0

Views

Author

Philippe Deléham, Mar 26 2012

Keywords

Comments

Triangle T(n,k), 0<=k<=n, read by rows, given by (1, 2, -1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Product of A122542 and A007318 (Pascal's triangle) as lower triangular matrices .

Examples

			Triangle begins :
1
1, 1
3, 4, 1
7, 13, 7, 1
17, 40, 32, 10, 1
41, 117, 124, 60, 13, 1
99, 332, 437, 286, 97, 16, 1
239, 921, 1447, 1193, 553, 143, 19, 1
577, 2512, 4584, 4556, 2682, 952, 198, 22, 1
1393, 6761, 14048, 16336, 11666, 5282, 1510, 262, 25, 1
		

Crossrefs

Cf. Columns :A001333, A119915, Diagonals : A000012, A016777, Antidiagonal sums : A077995

Formula

T(n,k) = 2*T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-2,k-1), T(0,0) = T(1,0) = T(1,1) = 1 and T(n,k) = 0 if k<0 or if k>n.
G.f.: (1-x)/(1-2*x-y*x-x^2-y*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000007(n), A001333(n), A104934(n), A122958(n), A122690(n), A091928(n) for x = -1, 0, 1, 2, 3, 4 respectively.
Showing 1-5 of 5 results.