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 21-30 of 57 results. Next

A254663 Numbers of n-length words on alphabet {0,1,...,7} with no subwords ii, where i is from {0,1,...,5}.

Original entry on oeis.org

1, 8, 58, 422, 3070, 22334, 162478, 1182014, 8599054, 62557406, 455099950, 3310814462, 24085901134, 175222936862, 1274732360302, 9273572395838, 67464471491470, 490798445231966, 3570518059606702, 25975223307710846, 188967599273189326, 1374723641527746974
Offset: 0

Views

Author

Milan Janjic, Feb 04 2015

Keywords

Comments

a(n) equals the number of octonary sequences of length n such that no two consecutive terms differ by 5. - David Nacin, May 31 2017

Crossrefs

Programs

  • Magma
    [n le 1 select 8^n else 7*Self(n)+2*Self(n-1): n in [0..20]];
    
  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 8, a[n] == 7 a[n - 1] + 2 a[n - 2]}, a[n], {n, 0, 20}]
    LinearRecurrence[{7,2},{1,8},30] (* Harvey P. Dale, Nov 28 2023 *)
  • PARI
    Vec((1 + x)/(1 - 7*x - 2*x^2) + O(x^30)) \\ Colin Barker, Jan 22 2017

Formula

G.f.: (1 + x)/(1 - 7*x - 2*x^2).
a(n) = 7*a(n-1) + 2*a(n-2) with n>1, a(0) = 1, a(1) = 8.
a(n) = 2^(-1-n)*((7-r)^n*(-9+r) + (7+r)^n*(9+r)) / r, where r=sqrt(57). - Colin Barker, Jan 22 2017

A254664 Numbers of words on alphabet {0,1,...,8} with no subwords ii, where i is from {0,1,...,5}.

Original entry on oeis.org

1, 9, 75, 627, 5241, 43809, 366195, 3060987, 25586481, 213874809, 1787757915, 14943687747, 124912775721, 1044133269009, 8727804479235, 72954835640907, 609822098564961, 5097441295442409, 42608996659234155, 356164297160200467
Offset: 0

Views

Author

Milan Janjic, Feb 04 2015

Keywords

Comments

a(n) is the number of nonary sequences of length n such that no two consecutive terms have distance 6. - David Nacin, May 31 2017

Crossrefs

Programs

  • Magma
    [n le 1 select 9^n else 8*Self(n)+3*Self(n-1): n in [0..20]];
  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 9, a[n] == 8 a[n - 1] + 3 a[n - 2]}, a[n], {n, 0, 20}]
    LinearRecurrence[{8,3},{1,9},20] (* Harvey P. Dale, Feb 16 2024 *)

Formula

G.f.: (1 + x)/(1 - 8*x -3*x^2).
a(n) = 8*a(n-1) + 3*a(n-2) with n>1, a(0) = 1, a(1) = 9.
a(n) = ((1+t)*(4-t)^(n+1)+(-1+t)*(4+t)^(n+1))/(6*t), where t=sqrt(19). [Bruno Berselli, Feb 04 2015]

A179598 Eight white kings and one red king on a 3 X 3 chessboard. G.f.: (1 + 2*x)/(1 - 3*x - 8*x^2).

Original entry on oeis.org

1, 5, 23, 109, 511, 2405, 11303, 53149, 249871, 1174805, 5523383, 25968589, 122092831, 574027205, 2698824263, 12688690429, 59656665391, 280479519605, 1318691881943, 6199911802669, 29149270463551, 137047105812005
Offset: 0

Views

Author

Johannes W. Meijer, Jul 28 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 king on the eight side and corner squares but on the central square the king goes crazy and turns into a red king, see A179596.
The sequence above corresponds to 10 red king vectors, i.e., A[5] vectors, with decimal values 239, 351, 375, 381, 431, 471, 477, 491, 494, and 501. These vectors lead for the corner squares to A015525 and for the central square to A179599.
Inverse binomial transform of A126501.

Crossrefs

Cf. A126473 (side squares).

Programs

  • Maple
    with(LinearAlgebra): nmax:=21; m:=2; A[1]:= [0,1,0,1,1,0,0,0,0]: A[2]:= [1,0,1,1,1,1,0,0,0]: A[3]:= [0,1,0,0,1,1,0,0,0]: A[4]:=[1,1,0,0,1,0,1,1,0]: A[5]:= [1,0,1,1,1,1,1,0,1]: A[6]:= [0,1,1,0,1,0,0,1,1]: A[7]:= [0,0,0,1,1,0,0,1,0]: A[8]:= [0,0,0,1,1,1,1,0,1]: A[9]:= [0,0,0,0,1,1,0,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);

Formula

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

A179602 Eight white kings and one red king on a 3 X 3 chessboard. G.f.: (1 + 2*x)/(1 - 3*x - 7*x^2).

Original entry on oeis.org

1, 5, 22, 101, 457, 2078, 9433, 42845, 194566, 883613, 4012801, 18223694, 82760689, 375847925, 1706868598, 7751541269, 35202703993, 159868900862, 726025630537, 3297159197645, 14973657006694, 68001085403597, 308818855257649
Offset: 0

Views

Author

Johannes W. Meijer, Jul 28 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 king on the eight side and corner squares but on the central square the king goes crazy and turns into a red king, see A179596.
The sequence above corresponds to 24 red king vectors, i.e., A[5] vectors, with decimal values 95, 119, 125, 215, 221, 245, 287, 311, 317, 347, 350, 371, 374, 377, 380, 407, 413, 437, 467, 470, 473, 476, 497 and 500. These vectors lead for the corner squares to A015524 and for the central square to A179603.

Crossrefs

Cf. A126473 (side squares).

Programs

  • Maple
    with(LinearAlgebra): nmax:=22; m:=2; A[1]:= [0,1,0,1,1,0,0,0,0]: A[2]:= [1,0,1,1,1,1,0,0,0]: A[3]:= [0,1,0,0,1,1,0,0,0]: A[4]:=[1,1,0,0,1,0,1,1,0]: A[5]:= [1,1,1,0,1,0,0,1,1]: A[6]:= [0,1,1,0,1,0,0,1,1]: A[7]:= [0,0,0,1,1,0,0,1,0]: A[8]:= [0,0,0,1,1,1,1,0,1]: A[9]:= [0,0,0,0,1,1,0,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+2x)/(1-3x-7x^2),{x,0,40}],x] (* or *) LinearRecurrence[ {3,7},{1,5},40] (* Harvey P. Dale, Mar 28 2013 *)

Formula

G.f.: (1+2*x)/(1 - 3*x - 7*x^2).
a(n) = 3*a(n-1) + 7*a(n-2) with a(0) = 1 and a(1) = 5.
a(n) = ((37+4*37^(1/2))*A^(-n-1) + (37-4*37^(1/2))*B^(-n-1))/259 with A = (-3+sqrt(37))/14 and B = (-3-sqrt(37))/14.

A209130 Triangle of coefficients of polynomials v(n,x) jointly generated with A102756; see the Formula section.

Original entry on oeis.org

1, 1, 2, 1, 5, 3, 1, 9, 12, 5, 1, 14, 31, 27, 8, 1, 20, 65, 89, 55, 13, 1, 27, 120, 230, 222, 108, 21, 1, 35, 203, 511, 684, 514, 205, 34, 1, 44, 322, 1022, 1777, 1834, 1125, 381, 55, 1, 54, 486, 1890, 4095, 5442, 4563, 2367, 696, 89, 1, 65, 705, 3288, 8625
Offset: 1

Views

Author

Clark Kimberling, Mar 05 2012

Keywords

Comments

Top edge: (1,2,3,5,8,...) = A000045(n+1), Fibonacci numbers.
Alternating row sums: 1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,...
For a discussion and guide to related arrays, see A208510.
Subtriangle of the triangle T(n,k) given by (1, 0, 1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 2, -1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 08 2012

Examples

			First five rows:
  1;
  1,  2;
  1,  5,  3;
  1,  9, 12,  5;
  1, 14, 31, 27,  8;
First three polynomials v(n,x):
  1
  1 + 2x
  1 + 5x + 3x^2.
From _Philippe Deléham_, Mar 08 2012: (Start)
(1, 0, 1/2, 1/2, 0, 0, 0, ...) DELTA (0, 2, -1/2, -1/2, 0, 0, 0, 0...) begins:
  1;
  1,  0;
  1,  2,  0;
  1,  5,  3,  0;
  1,  9, 12,  5,  0;
  1, 14, 31, 27,  8,  0;
  1, 20, 65, 89, 55, 13, 0; ...
with row sums 1, 1, 3, 9, 27, 81, 243, 729, ... (powers of 3). (End)
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + (x + 1)*v[n - 1, x];
    v[n_, x_] := x*u[n - 1, x] + (x + 1)*v[n - 1, x];
    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, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A102756 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A209130 *)

Formula

u(n,x) = u(n-1,x) + (x+1)*v(n-1,x),
v(n,x) = x*u(n-1,x) + (x+1)*v(n-1,x),
where u(1,x)=1, v(1,x)=1.
From Philippe Deléham, Mar 08 2012: (Start)
As DELTA-triangle T(n,k) with 0 <= k <= n:
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k) + T(n-2,k-2), T(0,0) = 1, T(1,0) = 1, T(1,1) = 0 and T(n,k) = 0 if k < 0 or if k > n.
G.f.: (1-x-y*x+y*x^2-y^2*x^2)/(1-(2+y)*x-(y^2-1)*x^2).
Sum_{k=0..n, n>=1} T(n,k)*x^k = A153881(n), A000012(n), A000244(n-1), A126473(n-1) for x = -1, 0, 1, 2 respectively. (End)

A218986 Power floor sequence of 2+sqrt(7).

Original entry on oeis.org

4, 18, 83, 385, 1788, 8306, 38587, 179265, 832820, 3869074, 17974755, 83506241, 387949228, 1802315634, 8373110219, 38899387777, 180716881764, 839565690386, 3900413406835, 18120350698497, 84182643014492, 391091624153458, 1816914425657307, 8440932575089601
Offset: 0

Views

Author

Clark Kimberling, Nov 11 2012

Keywords

Comments

See A214992 for a discussion of power floor sequence and the power floor function, p1(x) = limit of a(n,x)/x^n. The present sequence is a(n,r), where r = 2+sqrt(7), and the limit p1(r) = 3.83798607113023840500712572585708...
See A218987 for the power floor function, p4. For comparison with p1, limit(p4(r)/p1(r) = 4-sqrt(7).

Examples

			a(0) = [r] = 4, where r = 2+sqrt(7);
a(1) = [4*r] = 18; a(2) = [18*r] = 83.
		

Crossrefs

Programs

  • Mathematica
    x = 2 + Sqrt[7]; z = 30; (* z = # terms in sequences *)
    f[x_] := Floor[x]; c[x_] := Ceiling[x];
    p1[0] = f[x]; p2[0] = f[x]; p3[0] = c[x]; p4[0] = c[x];
    p1[n_] := f[x*p1[n - 1]]
    p2[n_] := If[Mod[n, 2] == 1, c[x*p2[n - 1]], f[x*p2[n - 1]]]
    p3[n_] := If[Mod[n, 2] == 1, f[x*p3[n - 1]], c[x*p3[n - 1]]]
    p4[n_] := c[x*p4[n - 1]]
    t1 = Table[p1[n], {n, 0, z}]  (* A218986 *)
    t2 = Table[p2[n], {n, 0, z}]  (* A015530 *)
    t3 = Table[p3[n], {n, 0, z}]  (* A126473 *)
    t4 = Table[p4[n], {n, 0, z}]  (* A218987 *)
    LinearRecurrence[{5,-1,-3},{4,18,83},30] (* Harvey P. Dale, Jun 18 2014 *)
  • PARI
    a(n) = round((14+(161-61*sqrt(7))*(2-sqrt(7))^n+(2+sqrt(7))^n*(161+61*sqrt(7)))/84) \\ Colin Barker, Sep 02 2016
    
  • PARI
    Vec((4-2*x-3*x^2)/((1-x)*(1-4*x-3*x^2)) + O(x^30)) \\ Colin Barker, Sep 02 2016

Formula

a(n) = [x*a(n-1)], where x=2+sqrt(7), a(0) = [x].
a(n) = 5*a(n-1) - a(n-2) - 3*a(n-3).
G.f.: (4 - 2*x - 3*x^2)/(1 - 5*x + x^2 + 3*x^3).
a(n) = (14+(161-61*sqrt(7))*(2-sqrt(7))^n+(2+sqrt(7))^n*(161+61*sqrt(7)))/84. - Colin Barker, Sep 02 2016

A218987 Power ceiling sequence of 2+sqrt(7).

Original entry on oeis.org

5, 24, 112, 521, 2421, 11248, 52256, 242769, 1127845, 5239688, 24342288, 113088217, 525379733, 2440783584, 11339273536, 52679444897, 244735600197, 1136980735480, 5282129742512, 24539461176489, 114004233933493, 529635319263440, 2460553978854240
Offset: 0

Views

Author

Clark Kimberling, Nov 11 2012

Keywords

Comments

See A214992 for a discussion of power ceiling sequence and the power ceiling function, p4(x) = limit of a(n,x)/x^n. The present sequence is a(n,r), where r = 2+sqrt(7), and the limit p4(r) = 5.19758760498048832156707270895307875397561324042...
See A218986 for the power floor function, p1(x); for comparison of p1 and p4, limit(p4(r)/p1(r) = 4 - sqrt(7).

Examples

			a(0) = ceiling(r) = 5, where r = 2+sqrt(7);
a(1) = ceiling(5*r) = 24; a(2) = ceiling(24*r) = 112.
		

Crossrefs

Programs

  • Mathematica
    (See A218986.)
  • PARI
    a(n) = round((-14+(217-83*sqrt(7))*(2-sqrt(7))^n+(2+sqrt(7))^n*(217+83*sqrt(7)))/84) \\ Colin Barker, Sep 02 2016
    
  • PARI
    Vec((5-x-3*x^2)/((1-x)*(1-4*x-3*x^2)) + O(x^30)) \\ Colin Barker, Sep 02 2016

Formula

a(n) = ceiling(x*a(n-1)), where x=2+sqrt(7), a(0) = ceiling(x).
a(n) = 5*a(n-1) - a(n-2) - 3*a(n-3).
G.f.: (5 - x - 3*x^2)/(1 - 5*x + x^2 + 3*x^3).
a(n) = (-14+(217-83*sqrt(7))*(2-sqrt(7))^n+(2+sqrt(7))^n*(217+83*sqrt(7)))/84. - Colin Barker, Sep 02 2016
E.g.f.: exp(x)*(exp(x)*(217*cosh(sqrt(7)*x) + 83*sqrt(7)*sinh(sqrt(7)*x)) - 7)/42. - Stefano Spezia, Aug 05 2025

A285267 Array read by antidiagonals: T(m,n) = number of m-ary words of length n with adjacent elements differing by 3 or less.

Original entry on oeis.org

1, 4, 1, 16, 5, 1, 64, 23, 6, 1, 256, 107, 30, 7, 1, 1024, 497, 154, 37, 8, 1, 4096, 2309, 788, 203, 44, 9, 1, 16384, 10727, 4034, 1111, 252, 51, 10, 1, 65536, 49835, 20650, 6083, 1446, 301, 58, 11, 1, 262144, 231521, 105708, 33305, 8300, 1787, 350, 65, 12, 1
Offset: 4

Views

Author

Andrew Howroyd, Apr 15 2017

Keywords

Comments

All rows are linear recurrences with constant coefficients. See PARI script to obtain generating functions.

Examples

			Array starts (m>=4, n>=0):
1  4 16  64  256  1024  4096  16384 ...
1  5 23 107  497  2309 10727  49835 ...
1  6 30 154  788  4034 20650 105708 ...
1  7 37 203 1111  6083 33305 182349 ...
1  8 44 252 1446  8300 47642 273466 ...
1  9 51 301 1787 10619 63111 375091 ...
1 10 58 350 2130 12990 79258 483646 ...
1 11 65 399 2473 15381 95757 596341 ...
		

Crossrefs

Rows 5-32 are A126473-A126500.

Programs

  • Mathematica
    diff = 3; m0 = 4; mmax = 13;
    TransferGf[m_, u_, t_, v_, z_] := Array[u, m].LinearSolve[IdentityMatrix[m] - z*Array[t, {m, m}], Array[v, m]]
    RowGf[d_, m_, z_] := 1+z*TransferGf[m, 1&, Boole[Abs[#1-#2] <= d]&, 1&, z];
    row[m_] := row[m] = CoefficientList[RowGf[diff, m, x] + O[x]^mmax, x];
    T[m_ /; m >= m0, n_ /; n >= 0] := row[m][[n + 1]];
    Table[T[m - n, n], {m, m0, mmax}, {n, m - m0, 0, -1}] // Flatten (* Jean-François Alcover, Jun 17 2017, adapted from PARI *)
  • PARI
    TransferGf(m,u,t,v,z)=vector(m,i,u(i))*matsolve(matid(m)-z*matrix(m,m,i,j,t(i,j)),vectorv(m,i,v(i)));
    RowGf(d,m,z)=1+z*TransferGf(m, i->1, (i,j)->abs(i-j)<=d, j->1, z);
    for(m=4, 12, print(RowGf(3,m,x)));
    for(m=4, 12, v=Vec(RowGf(3,m,x) + O(x^9)); for(n=1, length(v), print1( v[n], ", ") ); print(); );

A254599 Numbers of words on alphabet {0,1,...,9} with no subwords ii, for i from {0,1}.

Original entry on oeis.org

1, 10, 98, 962, 9442, 92674, 909602, 8927810, 87627106, 860066434, 8441614754, 82855064258, 813228496354, 7981896981250, 78342900802082, 768941283068738, 7547214754035298, 74076463050867586, 727065885490090658, 7136204673817756610, 70042369148280534754
Offset: 0

Views

Author

Milan Janjic, Feb 02 2015

Keywords

Comments

a(n) is the number of sequences over {0,1,...,9} of length n such that no two consecutive terms have distance 9. - David Nacin, May 31 2017

Crossrefs

Programs

  • Magma
    [n le 1 select 10^n else 9*Self(n)+8*Self(n-1): n in [0..20]]; // Bruno Berselli, Feb 02 2015
    
  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 10, a[n] == 9 a[n - 1] + 8 a[n - 2]}, a[n], {n, 0, 20}] (* Bruno Berselli, Feb 02 2015 *)
  • PARI
    Vec((1 + x)/(1 - 9*x - 8*x^2) + O(x^30)) \\ Colin Barker, Jan 22 2017

Formula

a(n) = 9*a(n-1) + 8*a(n-2) with n>1, a(0) = 1, a(1) = 10.
G.f.: (1 + x)/(1 - 9*x - 8*x^2). - Bruno Berselli, Feb 02 2015
a(n) = (2^(-1-n)*((9-r)^n*(-11+r) + (9+r)^n*(11+r))) / r, where r=sqrt(113). - Colin Barker, Jan 22 2017

A254659 Numbers of words on alphabet {0,1,...,8} with no subwords ii, where i is from {0,1,2,3}.

Original entry on oeis.org

1, 9, 77, 661, 5673, 48689, 417877, 3586461, 30781073, 264180889, 2267352477, 19459724261, 167014556473, 1433415073089, 12302393367077, 105586222302061, 906201745251873, 7777545073525289, 66751369314461677, 572898679883319861, 4916946285638867273
Offset: 0

Views

Author

Milan Janjic, Feb 04 2015

Keywords

Comments

a(n) is the number of nonary sequences of length n such that no two consecutive terms have distance 7. - David Nacin, May 31 2017

Crossrefs

Programs

  • Magma
    [n le 1 select 9^n else 8*Self(n)+5*Self(n-1): n in [0..20]];
    
  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 9, a[n] == 8 a[n - 1] + 5 a[n - 2]}, a[n], {n, 0, 20}]
  • PARI
    Vec((1 + x)/(1 - 8*x -5*x^2) + O(x^30)) \\ Colin Barker, Jan 22 2017

Formula

G.f.: (1 + x)/(1 - 8*x - 5*x^2).
a(n) = 8*a(n-1) + 5*a(n-2) with n>1, a(0) = 1, a(1) = 9.
a(n) = ((4-r)^n*(-5+r) + (4+r)^n*(5+r)) / (2*r), where r=sqrt(21). - Colin Barker, Jan 22 2017
Previous Showing 21-30 of 57 results. Next