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

A155116 a(n) = 3*a(n-1) + 3*a(n-2), n>2, a(0)=1, a(1)=2, a(2)=8.

Original entry on oeis.org

1, 2, 8, 30, 114, 432, 1638, 6210, 23544, 89262, 338418, 1283040, 4864374, 18442242, 69919848, 265086270, 1005018354, 3810313872, 14445996678, 54768931650, 207644784984, 787241149902, 2984657804658, 11315696863680, 42901064005014
Offset: 0

Views

Author

Philippe Deléham, Jan 20 2009

Keywords

Comments

From Johannes W. Meijer, Aug 14 2010: (Start)
A berserker sequence, see A180140 and A180147. For the central square 16 A[5] vectors with decimal values between 3 and 384 lead to this sequence. These vectors lead for the corner squares to A123620 and for the side squares to A180142.
This sequence belongs to a family of sequences with GF(x)=(1-(2*k-1)*x-k*x^2)/(1-3*x+(k-4)*x^2). Berserker sequences that are members of this family are A000007 (k=2), A155116 (k=1; this sequence), A000302 (k=0), 6*A179606 (k=-1; with leading 1 added) and 2*A180141 (k=-2; n>=1 and a(0)=1). Some other members of this family are (-2)*A003688 (k=3; with leading 1 added), (-4)*A003946 (k=4; with leading 1 added), (-6)*A002878 (k=5; with leading 1 added) and (-8)*A033484 (k=6; with leading 1 added).
Inverse binomial transform of A101368 (without the first leading 1).
(End)

Crossrefs

Sequences of the form a(n) = m*(a(n-1) + a(n-2)) with a(0)=1, a(1) = m-1, a(2) = m^2 -1: A155020 (m=2), this sequence (m=3), A155117 (m=4), A155119 (m=5), A155127 (m=6), A155130 (m=7), A155132 (m=8), A155144 (m=9), A155157 (m=10).

Programs

  • Magma
    m:=3; [1] cat [n le 2 select (m-1)*(m*n-(m-1)) else m*(Self(n-1) + Self(n-2)): n in [1..30]]; // G. C. Greubel, Mar 25 2021
    
  • Mathematica
    With[{m=3}, LinearRecurrence[{m, m}, {1, m-1, m^2-1}, 30]] (* G. C. Greubel, Mar 25 2021 *)
  • PARI
    Vec((1-x-x^2)/(1-3*x-3*x^2)+O(x^99)) \\ Charles R Greathouse IV, Jan 12 2012
    
  • Sage
    m=3; [1]+[-(m-1)*(sqrt(m)*i)^(n-2)*chebyshev_U(n, -sqrt(m)*i/2) for n in (1..30)] # G. C. Greubel, Mar 25 2021

Formula

G.f.: (1-x-x^2)/(1-3*x-3*x^2).
a(n) = 2*A125145(n-1), n>=1 .
a(n) = ( (2+4*A)*A^(-n-1) + (2+4*B)*B^(-n-1) )/21 with A=(-3+sqrt(21))/6 and B=(-3-sqrt(21))/6 for n>=1 with a(0)=1. [corrected by Johannes W. Meijer, Aug 12 2010]
Contribution from Johannes W. Meijer, Aug 14 2010: (Start)
a(n) = A123620(n)/2 for n>=1.
(End)
a(n) = (1/3)*[n=0] - 2*(sqrt(3)*i)^(n-2)*ChebyshevU(n, -sqrt(3)*i/2). - G. C. Greubel, Mar 25 2021

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

Original entry on oeis.org

1, 4, 16, 72, 312, 1368, 5976, 26136, 114264, 499608, 2184408, 9550872, 41759064, 182582424, 798301656, 3490399512, 15261008472, 66725422488, 291742318296, 1275579489816, 5577192379224, 24385054076568, 106618316505048
Offset: 0

Views

Author

Johannes W. Meijer, Aug 13 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in a given corner square (m = 1, 3, 7 or 9) on a 3 X 3 chessboard. This fairy chess piece behaves like a rook on the eight side and corner squares but on the central square the rook goes berserk and turns into a berserker, see A180140.
On a 3 X 3 chessboard there are 2^9 = 512 ways to go berserk on the central square (we assume here that a berserker might behave like a rook). The berserker is represented by the A[5] vector in the fifth row of the adjacency matrix A, see the Maple program. For the corner squares the 512 berserkers lead to 42 berserker sequences, see the cross-references for some examples.
The sequence above corresponds to just one A[5] vectors with decimal value 495. This vector leads for the side squares to 4*A154964 (for n >= 1 with a(0) = 1) and for the central square to 2*A180141 (for n >= 1 with a(0)=1).
This sequence belongs to a family of sequences with g.f. (1 + x + k*x^2)/(1 - 3*x + (k-4)*x^2), see A123620.

Crossrefs

Cf. A180140 (side squares) and A180147 (central square).
Cf. Berserker sequences corner squares [numerical value A[5]]: 4*A055099 [0, with leading 1 added], A180143 [16], 4*A001353 [17, n>=1 and a(0)=1], A123620 [3], 2*A018916 [19, with leading 1 added], A000302 [15], 4*A179606 [111, with leading 1 added], A089979 [343], 4*A001076 [95, n>=1 and a(0)=1], A180145 [191], A180141 [495, this sequence], 4*A090017 [383, n>=1 and a(0)=1].

Programs

  • Maple
    with(LinearAlgebra): nmax:=22; m:=1; A[5]:= [1,1,1,1,0,1,1,1,1]: A:= Matrix([[0,1,1,1,0,0,1,0,0], [1,0,1,0,1,0,0,1,0], [1,1,0,0,0,1,0,0,1], [1,0,0,0,1,1,1,0,0], A[5], [0,0,1,1,1,0,0,0,1], [1,0,0,1,0,0,0,1,1], [0,1,0,0,1,0,1,0,1], [0,0,1,0,0,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[{3, 6}, {1, 4, 16}, 23] (* Jean-François Alcover, Jan 18 2025 *)

Formula

G.f.: (1 + x - 2*x^2)/(1 - 3*x - 6*x^2).
a(n) = 4*a(n-1) - 2*a(n-3) with a(0)=2, a(1)=8 and a(2)=31.
a(n) = 3*a(n-1) + 6*a(n-2) for n >= 3 with a(0)=1, a(1)=4 and a(2)=16.
a(n) = (6+2*A)*A^(-n-1)/33 + (6+2*B)*B^(-n-1)/33 with A=(-3-sqrt(33))/12 and B=(-3+sqrt(33))/12 for n >= 1 with a(0)=1.

A265584 Array T(n,k) counting words with n letters drawn from a k-letter alphabet with no letter appearing thrice in a 3-letter subword.

Original entry on oeis.org

1, 1, 2, 0, 4, 3, 0, 6, 9, 4, 0, 10, 24, 16, 5, 0, 16, 66, 60, 25, 6, 0, 26, 180, 228, 120, 36, 7, 0, 42, 492, 864, 580, 210, 49, 8, 0, 68, 1344, 3276, 2800, 1230, 336, 64, 9, 0, 110, 3672, 12420, 13520, 7200, 2310, 504, 81, 10, 0, 178, 10032, 47088, 65280, 42150, 15876, 3976, 720, 100, 11
Offset: 1

Views

Author

R. J. Mathar, Dec 10 2015

Keywords

Comments

The antidiagonal sums are s(d) = 1, 3, 7, 19, 55, 173, 597, 2245, 9127, 39827, 185411, 916177, 4784217,.. at index d=n+k >=2.

Examples

			1      2      3      4      5       6       7        8
1      4      9     16     25      36      49       64
0      6     24     60    120     210     336      504
0     10     66    228    580    1230    2310     3976
0     16    180    864   2800    7200   15876    31360
0     26    492   3276  13520   42150  109116   247352
0     42   1344  12420  65280  246750  749952  1950984
0     68   3672  47088 315200 1444500 5154408 15388352
T(3,2) =6 counts the 3-letter words aab, aba, abb, bba, bab, baa. The words aaa and bbb are not counted.
		

Crossrefs

Cf. A265583 (no letter twice), A265624. A000290 (row 2), A007531 (row 3), A006355 (column 2), A121907 (column 3), A123620 (column 4), A123871 (column 5), A123887 (column 6).

Programs

  • Maple
    A265584 := proc(n,k)
        (1+x+x^2)/(1-(k-1)*x-(k-1)*x^2) ;
        coeftayl(%,x=0,n) ;
    end proc:
    seq(seq( A265584(d-k,k),k=1..d-1),d=2..13) ;
  • Mathematica
    T[n_, k_] := SeriesCoefficient[(1+x+x^2)/(1-(k-1)*x-(k-1)*x^2), {x, 0, n}];
    Table[T[n-k, k], {n, 2, 12}, {k, 1, n-1}] // Flatten (* Jean-François Alcover, Mar 26 2020, from Maple *)

Formula

T(4,k) = k*(k-1)*(k^2+k-1).
T(5,k) = k^2*(k+2)*(k-1)^2.
T(6,k) = k*(k^3+2*k^2-k-1)*(k-1)^2.
T(7,k) = k*(k+1)*(k^2+2*k-1)*(k-1)^3.

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

Original entry on oeis.org

1, 4, 14, 54, 204, 774, 2934, 11124, 42174, 159894, 606204, 2298294, 8713494, 33035364, 125246574, 474845814, 1800277164, 6825368934, 25876938294, 98106921684, 371951579934, 1410175504854, 5346381254364, 20269670277654, 76848154596054, 291353474621124
Offset: 0

Views

Author

Johannes W. Meijer, Aug 13 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in a given side square (m = 2, 4, 6 or 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a rook on the eight side and corner squares but on the central square the rook goes berserk and turns into a berserker, see A180140.
The sequence above corresponds to 16 A[5] vectors with decimal values between 3 and 384. These vectors lead for the corner squares to A123620 and for the central square to A155116.
This sequence appears among the members of a family of sequences with g.f. (1 + x - k*x^2)/(1 - 3*x + (k-4)*x^2). Berserker sequences that are members of this family are 4*A007482 (k=2; with leading 1 added), A180142 (k=1; this sequence), A000302 (k=0), A180140 (k=-1) and 4*A154964 (k=-2; n>=1 and a(0)=1). Some other members of this family are 2*A180148 (k=3; with leading 1 added), 4*A025192 (k=4; with leading 1 added), 2*A005248 (k=5; with leading 1 added) and A123932 (k=6).

Crossrefs

Cf. A180141 (corner squares), A180140 (side squares), A180147 (central square).

Programs

  • Maple
    with(LinearAlgebra): nmax:=23; m:=2; A[5]:=[0,0,0,0,0,0,0,1,1]: A:= Matrix([[0,1,1,1,0,0,1,0,0], [1,0,1,0,1,0,0,1,0], [1,1,0,0,0,1,0,0,1], [1,0,0,0,1,1,1,0,0], A[5], [0,0,1,1,1,0,0,0,1], [1,0,0,1,0,0,0,1,1], [0,1,0,0,1,0,1,0,1], [0,0,1,0,0,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);
    # second Maple program:
    a:= n-> ceil((<<0|1>, <3|3>>^n. <<2/3, 4>>)[1,1]):
    seq(a(n), n=0..25);  # Alois P. Heinz, Jul 14 2021
  • Mathematica
    LinearRecurrence[{3, 3}, {1, 4, 14}, 26] (* Jean-François Alcover, Jan 18 2025 *)

Formula

G.f.: (1 + x - x^2)/(1 - 3*x - 3*x^2).
a(n) = 3*a(n-1) + 3*a(n-2) for n >= 2 with a(0)=1, a(1)=4 and a(2)=14.
a(n) = (6-2*A)*A^(-n-1)/21 + (6-2*B)*B^(-n-1)/21 with A=(-3+sqrt(21))/6 and B=(-3-sqrt(21))/6.
Lim_{k->infinity} a(2*n+k)/a(k) = 2*A000244(n)/(A003501(n) - A004254(n)*sqrt(21)) for n >= 1.
Lim_{k->infinity} a(2*n-1+k)/a(k) = 2*A000244(n)/(A004253(n)*sqrt(21) - 3*A030221(n-1)) for n >= 1.
Showing 1-4 of 4 results.