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

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.

A099089 Riordan array (1, 2+x).

Original entry on oeis.org

1, 0, 2, 0, 1, 4, 0, 0, 4, 8, 0, 0, 1, 12, 16, 0, 0, 0, 6, 32, 32, 0, 0, 0, 1, 24, 80, 64, 0, 0, 0, 0, 8, 80, 192, 128, 0, 0, 0, 0, 1, 40, 240, 448, 256, 0, 0, 0, 0, 0, 10, 160, 672, 1024, 512, 0, 0, 0, 0, 0, 1, 60, 560, 1792, 2304, 1024, 0, 0, 0, 0, 0, 0, 12, 280, 1792, 4608, 5120, 2048
Offset: 0

Views

Author

Paul Barry, Sep 25 2004

Keywords

Comments

Row sums are A000129. Diagonal sums are A008346. The Riordan array (1, s+tx) defines T(n,k) = binomial(k,n-k)*s^k*(t/s)^(n-k). The row sums satisfy a(n) = s*a(n-1) + t*a(n-2) and the diagonal sums satisfy a(n) = s*a(n-2) + t*a(n-3).
Triangle T(n,k), 0 <= k <= n, read by rows given by [0, 1/2, -1/2, 0, 0, 0, 0, ...] DELTA [2, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 10 2008
As an upper right triangle (in the example), table rows give number of points, edges, faces, cubes, 4D hypercubes etc. in hypercubes of increasing dimension by column. - Henry Bottomley, Apr 14 2000. More precisely, the (i,j)-th entry is the number of j-dimensional subspaces of an i-dimensional hypercube (see the Coxeter reference). - Christof Weber, May 08 2009

Examples

			Triangle begins:
  1;
  0,  2;
  0,  1,  4;
  0,  0,  4,  8;
  0,  0,  1, 12, 16;
  0,  0,  0,  6, 32, 32;
  0,  0,  0,  1, 24, 80, 64;
The entries can also be interpreted as the antidiagonal reading of the following array:
  1,    2,    4,    8,   16,   32,   64,  128,  256,  512, 1024,... A000079
  0,    1,    4,   12,   32,   80,  192,  448, 1024, 2304, 5120,... A001787
  0,    0,    1,    6,   24,   80,  240,  672, 1792, 4608,11520,... A001788
  0,    0,    0,    1,    8,   40,  160,  560, 1792, 5376,15360,... A001789
  0,    0,    0,    0,    1,   10,   60,  280, 1120, 4032,13440,...
  0,    0,    0,    0,    0,    1,   12,   84,  448, 2016, 8064,...
  0,    0,    0,    0,    0,    0,    1,   14,  112,  672, 3360,...
  0,    0,    0,    0,    0,    0,    0,    1,   16,  144,  960,...
  0,    0,    0,    0,    0,    0,    0,    0,    1,   18,  180,...
  0,    0,    0,    0,    0,    0,    0,    0,    0,    1,   20,...
  0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    1,...
		

References

  • H. S. M. Coxeter, Regular Polytopes, Dover Publications, New York (1973), p. 122.

Crossrefs

Formula

Number triangle T(n,k) = binomial(k, n-k)*2^k*(1/2)^(n-k); columns have g.f. (2*x+x^2)^k.
G.f.: 1/(1-2y*x-y*x^2). - Philippe Deléham, Nov 20 2011
Sum_ {k=0..n} T(n,k)*x^k = A000007(n), A000129(n+1), A090017(n+1), A090018(n), A190510(n+1), A190955(n+1) for x = 0,1,2,3,4,5 respectively. - Philippe Deléham, Nov 20 2011
T(n,k) = 2*T(n-1,k-1) + T(n-2,k-1), T(0,0) = 1, T(1,0) = T(2,0) = 0, T(1,1) = 2, T(2,1) = 1, T(2,2) = 4, T(n,k) = 0 if k > n or if k < 0. - Philippe Deléham, Oct 30 2013

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

Original entry on oeis.org

1, 6, 37, 227, 1394, 8559, 52553, 322678, 1981261, 12165051, 74694082, 458625767, 2815987409, 17290317414, 106163498933, 651849716563, 4002393075346, 24574913392671, 150891318490777, 926480986202582, 5688644160448349
Offset: 0

Views

Author

Johannes W. Meijer, Aug 09 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in a given corner or side square (m = 1, 3, 7, 9; 2, 4, 6, 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a white chess 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 central square (we assume here that a red queen might behave like a white queen). The red queen is represented by the A[5] vector in the fifth row of the adjacency matrix A, see the Maple program. For the corner and side squares the 512 red queens lead to 17 red queen sequences, see the cross-references for the complete set.
The sequence above corresponds to 8 red queen vectors, i.e., A[5] vectors, with decimal values 239, 367, 431, 463, 487, 491, 493 and 494. The central square leads for these vectors to A152240.
This sequence belongs to a family of sequences with g.f. (1+x)/(1 - 5*x - k*x^2). The members of this family that are red queen sequences are A180030 (k=8), A180032 (k=7; this sequence), A000400 (k=6), A180033 (k=5), A126501 (k=4), A180035 (k=3), A180037 (k=2) A015449 (k=1) and A003948 (k=0). Other members of this family are A030221 (k=-1), A109114 (k=-3), A020989 (k=-4), A166060 (k=-6).
Inverse binomial transform of A054413.

Crossrefs

Cf. A180028 (Central square).
Cf. Red queen sequences corner and side squares [decimal value A[5]]: A090018 [511], A135030 [255], A180030 [495], A005668 [127], A180032 [239], A000400 [63], A180033 [47], A001109 [31], A126501 [15], A154244 [23], A180035 [7], A138395 [19], A180037 [3], A084326 [17], A015449 [1], A003463 [16], A003948 [0].

Programs

  • Magma
    I:=[1,6]; [n le 2 select I[n] else 5*Self(n-1)+7*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
  • Maple
    with(LinearAlgebra): nmax:=20; m:=1; A[5]:= [1,1,1,1,0,1,1,1,0]: 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,7},{1,6},40] (* Vincenzo Librandi, Nov 15 2011 *)
    CoefficientList[Series[(1+x)/(1-5x-7x^2),{x,0,30}],x] (* Harvey P. Dale, Apr 04 2024 *)

Formula

G.f.: (1+x)/(1 - 5*x - 7*x^2).
a(n) = 5*a(n-1) + 7*a(n-2) with a(0) = 1 and a(1) = 6.
a(n) = ((7+9*A)*A^(-n-1) + (7+9*B)*B^(-n-1))/53 with A = (-5+sqrt(53))/14 and B = (-5-sqrt(53))/14.

A099842 Expansion of (1-x)/(1 + 6*x - 3*x^2).

Original entry on oeis.org

1, -7, 45, -291, 1881, -12159, 78597, -508059, 3284145, -21229047, 137226717, -887047443, 5733964809, -37064931183, 239591481525, -1548743682699, 10011236540769, -64713650292711, 418315611378573, -2704034619149571, 17479154549033145, -112987031151647583
Offset: 0

Views

Author

Paul Barry, Oct 27 2004

Keywords

Comments

A transformation of x/(1-2*x-2*x^2).
The g.f. is the transform of the g.f. of A002605 under the mapping G(x) -> (-1/(1+x))*G((x-1)/(x+1)). In general this mapping transforms x/(1-k*x-k*x^2) into (1-x)/(1+2*(k+1)*x-(2*k-1)*x^2).
For n >= 1, |a(n)| equals the numbers of words of length n-1 on alphabet {0,1,...,6} containing no subwords 00, 11, 22, 33. - Milan Janjic, Jan 31 2015

Crossrefs

Programs

  • Magma
    [n le 2 select (-7)^(n-1) else -6*Self(n-1) +3*Self(n-2): n in [1..31]]; // G. C. Greubel, Oct 10 2022
    
  • Mathematica
    LinearRecurrence[{-6,3}, {1,-7}, 31] (* G. C. Greubel, Oct 10 2022 *)
    CoefficientList[Series[(1-x)/(1+6x-3x^2),{x,0,40}],x] (* Harvey P. Dale, Aug 31 2024 *)
  • SageMath
    A099842 = BinaryRecurrenceSequence(-6,3,1,-7)
    [A099842(n) for n in range(31)] # G. C. Greubel, Oct 10 2022

Formula

G.f.: (1-x)/(1+6*x-3*x^2).
a(n) = (1/2 - sqrt(3)/3)*(-3 + 2*sqrt(3))^n + (1/2 + sqrt(3)/3)*(-3 - 2*sqrt(3))^n.
a(n) = (-1)^n*Sum_{k=0..n} binomial(n, k)(-1)^(n-k)*A002605(2k+2)/2.
a(n) = (-1)^n*(A090018(n) + A090018(n-1)). - R. J. Mathar, Apr 07 2022

A227418 Array A(n,k) with all numbers m such that 3*m^2 +- 3^k is a square and their corresponding square roots, read by downward antidiagonals.

Original entry on oeis.org

0, 1, 1, 0, 2, 4, 3, 3, 7, 15, 0, 6, 12, 26, 56, 9, 9, 21, 45, 97, 209, 0, 18, 36, 78, 168, 362, 780, 27, 27, 63, 135, 291, 627, 1351, 2911, 0, 54, 108, 234, 504, 1086, 2340, 5042, 10864, 81, 81, 189, 405, 873, 1881, 4053, 8733, 18817, 40545
Offset: 0

Views

Author

Richard R. Forberg, Sep 02 2013

Keywords

Comments

Array is analogous to A228405 in goal and structure, with key differences.
Left column is A001353. Top row (not in OEIS) interleaves 0 with the powers of 3, as: 0, 1, 0, 3, 0, 9, 0, 27, 0, 81.
Either or both may be used as initializing values. See Formula section.
The left column is the second binomial transform of the top row. The intermediate transform sequence is A002605, not present in this array.
The columns of the array hold all values, in sequential order, of numbers m such that 3*m^2 + 3^k or 3*m^2 - 3^k are squares, and their corresponding square roots in the next column, which then form the "next round" of m values for column k+1.
For example: A(n,0) are numbers such that 3*m^2 + 1 are squares, the integer square roots of each are in A(n,1), which are then numbers m such that 3*m^2 - 3 are squares, with those square roots in A(n,2), etc. The sign alternates for each increment of k, etc. No integer square roots exist for the opposite sign in a given column, regardless of n.
Also, A(n,1) are values of m such that floor(m^2/3) is square, with the corresponding square roots given by A(n,0).
A(n,k)/A(n,k-2) = 3; A(n,k)/A(n,k-1) converges to sqrt(3) for large n.
A(n,k)/A(n-1,k) converges to 2 + sqrt(3) for large n.
Several ways of combining the first few columns give OEIS sequences:
A(n,0) + A(n,1) = A001835; A(n,1) + A(n,2)= A001834; A(n,2) + A(n,3) = A082841;
A(n,0)*A(n,1)/2 = A007655(n); A(n+2,0)*A(n+1,1) = A001922(n);
A(n,0)*A(n+1,1) = A001921(n); A(n,0)^2 + A(n,1)^2 = A103974(n);
A(n,1)^2 - A(n,0)^2 = A011922(n); (A(n+2,0)^2 + A(n+1,1)^2)/2 = A122770(n) = 2*A011916(n).
The main diagonal (without initial 0) = 2*A090018. The first subdiagonal = abs(A099842). First superdiagonal = A141041.
A001353 (in left column) are the only initializing set of numbers where the recursive square root equation (see below) produces exclusively integer values, for all iterations of k. For any other initial values only even iterations (at k = 2, 4, ...) produce integers.

Examples

			The array, A(n, k), begins as:
    0,    1,    0,    3,    0,     9,     0,    27, ... see A000244;
    1,    2,    3,    6,    9,    18,    27,    54, ... A038754;
    4,    7,   12,   21,   36,    63,   108,   189, ... A228879;
   15,   26,   45,   78,  135,   234,   405,   702, ...
   56,   97,  168,  291,  504,   873,  1512,  2619, ...
  209,  362,  627, 1086, 1881,  3258,  5643,  9774, ...
  780, 1351, 2340, 4053, 7020, 12159, 21060, 36477, ...
Antidiagonal triangle, T(n, k), begins as:
   0;
   1,  1;
   0,  2,   4;
   3,  3,   7,  15;
   0,  6,  12,  26,  56;
   9,  9,  21,  45,  97,  209;
   0, 18,  36,  78, 168,  362,  780;
  27, 27,  63, 135, 291,  627, 1351, 2911;
   0, 54, 108, 234, 504, 1086, 2340, 5042, 10864;
  81, 81, 189, 405, 873, 1881, 4053, 8733, 18817, 40545;
		

Crossrefs

Programs

  • Magma
    function A(n,k)
      if k lt 0 then return 0;
      elif n eq 0 then return Round((1/2)*(1-(-1)^k)*3^((k-1)/2));
      elif k eq 0 then return Evaluate(ChebyshevSecond(n), 2);
      else return 2*A(n, k-1) - A(n-1, k-1);
      end if; return A;
    end function;
    A227418:= func< n,k | A(k, n-k) >;
    [A227418(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Oct 09 2022
    
  • Mathematica
    A[n_, k_]:= If[k<0, 0, If[k==0, ChebyshevU[n-1, 2], 2*A[n, k-1] - A[n-1, k-1]]];
    T[n_, k_]:= A[k, n-k];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 09 2022 *)
  • SageMath
    def A(n,k):
        if (k<0): return 0
        elif (k==0): return chebyshev_U(n-1,2)
        else: return 2*A(n, k-1) - A(n-1, k-1)
    def A227418(n, k): return A(k, n-k)
    flatten([[A227418(n,k) for k in range(n+1)] for n in range(15)]) # G. C. Greubel, Oct 09 2022

Formula

If using the left column and top row to initialize, then: A(n,k) = 2*A(n, k-1) - A(n-1, k-1).
If using only the top row to initialize, then: A(n,k) = 4*A(n-1,k) - A(n-2,k).
If using the left column to initialize, then: A(n,k) = sqrt(3*A(n,k-1) + (-3)^(k-1)), for all n, k > 0.
Other internal relationships that apply are: A(2*n-1, 2*k) = A(n,k)^2 - A(n-1,k)^2;
A(n+1,k) * A(n,k+1) - A(n+1, k+1) * A(n,k) = (-3)^k, for all n, k > 0.
A(n, 0) = A001353(n).
A(n, 1) = A001075(n).
A(n, 2) = A005320(n).
A(n, 3) = A151961(n).
A(1, k) = A038754(k).
A(n, n) = 2*A090018(n), for n > 0 (main diagonal).
A(n, n+1) = A141041(n-1) (superdiagonal).
A(n+1, n) = abs(A099842(n)) (subdiagonal).
From G. C. Greubel, Oct 09 2022: (Start)
T(n, 0) = (1/2)*(1-(-1)^n)*3^((n-1)/2).
T(n, 1) = A038754(n-1).
T(n, 2) = A228879(n-2).
T(2*n-1, n-1) = A141041(n-1).
T(2*n, n) = 2*A090018(n-1), n > 0.
T(n, n-4) = 3*A005320(n-4).
T(n, n-3) = 3*A001075(n-3).
T(n, n-2) = 3*A001353(n-2).
T(n, n-1) = A001075(n-1).
T(n, n) = A001353(n).
Sum_{k=0..n-1} T(n, k) = A084156(n).
Sum_{k=0..n} T(n, k) = A084156(n) + A001353(n). (End)

Extensions

Offset corrected by G. C. Greubel, Oct 09 2022

A189800 a(n) = 6*a(n-1) + 8*a(n-2), with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 6, 44, 312, 2224, 15840, 112832, 803712, 5724928, 40779264, 290475008, 2069084160, 14738305024, 104982503424, 747801460736, 5326668791808, 37942424436736, 270267896954880, 1925146777223168, 13713023838978048, 97679317251653632, 695780094221746176
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[0,1]; [n le 2 select I[n] else 6*Self(n-1)+8*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 14 2011
    
  • Mathematica
    LinearRecurrence[{6, 8}, {0, 1}, 50]
    CoefficientList[Series[-(x/(-1+6 x+8 x^2)),{x,0,50}],x] (* Harvey P. Dale, Jul 26 2011 *)
  • PARI
    a(n)=([0,1; 8,6]^n*[0;1])[1,1] \\ Charles R Greathouse IV, Oct 03 2016

Formula

G.f.: x/(1 - 2*x*(3+4*x)). - Harvey P. Dale, Jul 26 2011

A342134 Square array T(n,k), n>=0, k>=0, read by antidiagonals, where column k is the expansion of g.f. 1/(1 - 2*k*x - k*x^2).

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 4, 5, 0, 1, 6, 18, 12, 0, 1, 8, 39, 80, 29, 0, 1, 10, 68, 252, 356, 70, 0, 1, 12, 105, 576, 1629, 1584, 169, 0, 1, 14, 150, 1100, 4880, 10530, 7048, 408, 0, 1, 16, 203, 1872, 11525, 41344, 68067, 31360, 985, 0, 1, 18, 264, 2940, 23364, 120750, 350272, 439992, 139536, 2378, 0
Offset: 0

Views

Author

Seiichi Manyama, Mar 01 2021

Keywords

Examples

			Square array begins:
  1,  1,    1,     1,     1,      1, ...
  0,  2,    4,     6,     8,     10, ...
  0,  5,   18,    39,    68,    105, ...
  0, 12,   80,   252,   576,   1100, ...
  0, 29,  356,  1629,  4880,  11525, ...
  0, 70, 1584, 10530, 41344, 120750, ...
		

Crossrefs

Columns 0..5 give A000007, A000129(n+1), A090017(n+1), A090018, A190510(n+1), A190955(n+1).
Rows 0..2 give A000012, A005843, A007742.
Main diagonal gives A109517(n+1).

Programs

  • Maple
    T:= (n, k)-> (<<0|1>, >^(n+1))[1, 2]:
    seq(seq(T(n, d-n), n=0..d), d=0..12); # Alois P. Heinz, Mar 01 2021
  • Mathematica
    T[n_, k_] := Sum[If[k == j == 0, 1, (2*k)^j] * 2^(j - n) * Binomial[j, n - j], {j, 0, n}]; Table[T[k, n - k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Apr 27 2021 *)
  • PARI
    T(n, k) = sum(j=0, n\2, (2*k)^(n-j)*2^(-j)*binomial(n-j, j));
    
  • PARI
    T(n, k) = sum(j=0, n, (2*k)^j*2^(j-n)*binomial(j, n-j));
    
  • PARI
    T(n, k) = round((-sqrt(k)*I)^n*polchebyshev(n, 2, sqrt(k)*I));

Formula

T(0,k) = 1, T(1,k) = 2*k and T(n,k) = k*(2*T(n-1,k) + T(n-2,k)) for n > 1.
T(n,k) = Sum_{j=0..floor(n/2)} (2*k)^(n-j) * (1/2)^j * binomial(n-j,j) = Sum_{j=0..n} (2*k)^j * (1/2)^(n-j) * binomial(j,n-j).
T(n,k) = (-sqrt(k)*i)^n * U(n, sqrt(k)*i) where U(n, x) is a Chebyshev polynomial of the second kind.

A201972 Triangle T(n,k), read by rows, given by (2,1/2,-1/2,0,0,0,0,0,0,0,...) DELTA (2,-1/2,1/2,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 2, 2, 5, 8, 3, 12, 28, 20, 4, 29, 88, 94, 40, 5, 70, 262, 372, 244, 70, 6, 169, 752, 1333, 1184, 539, 112, 7, 408, 2104, 4472, 5016, 3144, 1064, 168, 8, 985, 5776, 14316, 19408, 15526, 7344, 1932, 240, 9
Offset: 0

Views

Author

Philippe Deléham, Dec 07 2011

Keywords

Comments

Diagonal sums: A201967(n), row sums: A000302(n) (powers of 4).

Examples

			Triangle begins:
    1;
    2,   2;
    5,   8,    3;
   12,  28,   20,    4;
   29,  88,   94,   40,   5;
   70, 262,  372,  244,  70,   6;
  169, 752, 1333, 1184, 539, 112, 7;
		

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember;
          if k=0 and n=0 then 1
        elif k<0 or  k>n  then 0
        else 2*T(n-1,k) + 2*T(n-1,k-1) + T(n-2,k) - T(n-2,k-2)
          fi; end:
    seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Feb 17 2020
  • Mathematica
    With[{m = 8}, CoefficientList[CoefficientList[Series[1/(1-2*(y+1)*x+(y+1)*(y-1)*x^2), {x, 0 , m}, {y, 0, m}], x], y]] // Flatten (* Georg Fischer, Feb 17 2020 *)
  • PARI
    T(n,k) = if(nMichel Marcus, Feb 17 2020
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (k==0 and n==0): return 1
        else: return 2*T(n-1,k) + 2*T(n-1,k-1) + T(n-2,k) - T(n-2,k-2)
    [[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Feb 17 2020

Formula

G.f.: 1/(1-2*(y+1)*x+(y+1)*(y-1)*x^2).
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A000129(n+1), A000302(n), A138395(n), A057084(n) for x = -1, 0, 1, 2, 3, respectively.
Sum_{k=0..n} T(n,k)*x^(n-k) = A000027(n), A000302(n), A090018(n), A057091(n) for x = 0, 1, 2, 3, respectively.
T(n,k) = 2*T(n-1,k) + 2*T(n-1,k-1) + T(n-2,k) - T(n-2,k-2) with T(0,0) = 1, T(n,k) = 0 if k < 0 or if n < k.

Extensions

a(40) corrected by Georg Fischer, Feb 17 2020

A287811 Number of septenary sequences of length n such that no two consecutive terms have distance 5.

Original entry on oeis.org

1, 7, 45, 291, 1881, 12159, 78597, 508059, 3284145, 21229047, 137226717, 887047443, 5733964809, 37064931183, 239591481525, 1548743682699, 10011236540769, 64713650292711, 418315611378573, 2704034619149571, 17479154549033145, 112987031151647583
Offset: 0

Views

Author

David Nacin, Jun 01 2017

Keywords

Examples

			For n=2 the a(2) = 49-4 = 45 sequences contain every combination except these four: 05, 50, 16, 61.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{6, 3}, {1,7}, 40]
  • Python
    def a(n):
     if n in [0, 1]:
      return [1, 7][n]
     return 6*a(n-1)-3*a(n-2)

Formula

a(n) = 6*a(n-1) + 3*a(n-2), a(0)=1, a(1)=7.
G.f.: (1 + x)/(1 - 6*x - 3*x^2).
a(n) = A090018(n-1)+A090018(n). - R. J. Mathar, Oct 20 2019
Showing 1-9 of 9 results.