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 41-50 of 73 results. Next

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

Original entry on oeis.org

1, 3, 15, 59, 259, 1079, 4607, 19443, 82507, 349215, 1479879, 6267707, 26552755, 112474631, 476459471, 2018296131, 8549676763, 36216937647, 153417558423, 649886909195, 2752965719491, 11661748738583, 49399962770975
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 corner square (m = 1, 3, 7 or 9) 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 4 red king vectors, i.e., A[5] vectors, with decimal [binary] values 327 [1,0,1,0,0,0,1,1,1], 333 [1,0,1,0,0,1,1,0,1], 357 [1,0,1,1,0,0,1,0,1] and 453 [1,1,1,0,0,0,1,0,1]. These vectors lead for the side squares to A015448 and for the central square to A179605.

Crossrefs

Programs

  • Maple
    with(LinearAlgebra): nmax:=22; m:=1; 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,0,0,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);
  • Mathematica
    LinearRecurrence[{2,9,2},{1,3,15},30] (* or *) CoefficientList[ Series[ (x+1)/(-2 x^3-9 x^2-2 x+1),{x,0,30}],x] (* Harvey P. Dale, Mar 17 2012 *)

Formula

G.f.: ( -1-x ) / ( (2*x+1)*(x^2 + 4*x - 1) ).
a(n) = 2*a(n-1) + 9*a(n-2) + 2*a(n-3) with a(0)=1, a(1)=3 and a(2)=15.
a(n) = (20*(-1/2)^(-n) + (5+7*sqrt(5))*A^(-n-1) + (5-7*sqrt(5))*B^(-n-1))/110 with A = (-2+sqrt(5)) and B:= (-2-sqrt(5)).
Limit_{k->oo} a(n+k)/a(k) = (-1)^(n+1)/(A001076(n)*sqrt(5) - A001077(n)).

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

Original entry on oeis.org

1, 5, 17, 81, 325, 1413, 5913, 25193, 106429, 451421, 1911089, 8097825, 34298293, 145299189, 615478665, 2607246617, 11044399597, 46784976077, 198184041761, 839521667409, 3556269662821, 15064602415845, 63814675131897
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 the central square (m = 5) 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 toes crazy and turns into a red king, see A179596.
The sequence above corresponds to 4 red king vectors, A[5] vectors, with decimal [binary] values 327 [1,0,1,0,0,0,1,1,1], 333 [1,0,1,0,0,1,1,0,1], 357 [1,0,1,1,0,0,1,0,1] and 453 [1,1,1,0,0,0,1,0,1]. These vectors lead for the corner squares to A179604 and for the side squares to A015448.

Crossrefs

Cf. A001076, A001077, A015448, A179596, A179597 (central square), A179604.

Programs

  • Maple
    with(LinearAlgebra): nmax:=21; m:=5; 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,0,0,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 - 3*x + 2*x^2 ) / ( (2*x+1)*(x^2 + 4*x - 1) ).
a(n) = 2*a(n-1) + 9*a(n-2) + 2*a(n-3) with a(0)=1, a(1)=5 and a(2)=17.
a(n) = (-4/11)*(-1/2)^(-n) + ((17+41*A)*A^(-n-1) + (17+41*B)*B^(-n-1))/110 with A = (-2+sqrt(5)) and B =(-2-sqrt(5)).
Limit_{k->oo} a(n+k)/a(k) = (-1)^(n+1)/(A001076(n)*sqrt(5) - A001077(n)).

A020712 Pisot sequences E(5,8), P(5,8).

Original entry on oeis.org

5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465, 14930352, 24157817, 39088169, 63245986, 102334155, 165580141
Offset: 0

Views

Author

Keywords

Comments

Pisano period lengths: 1, 3, 8, 6, 20, 24, 16, 12, 24, 60, 10, 24, 28, 48, 40, 24, 36, 24, 18, 60,.. - R. J. Mathar, Aug 10 2012

Crossrefs

Subsequence of A020701 and hence A020695, A000045. See A008776 for definitions of Pisot sequences.
Trisections: A015448, A014445, A033887.

Programs

Formula

a(n) = Fib(n+5). a(n) = a(n-1) + a(n-2).
O.g.f.: (5+3x)/(1-x-x^2). a(n)=A020701(n+1). - R. J. Mathar, May 28 2008
a(n) = (2^(-1-n)*((1-sqrt(5))^n*(-11+5*sqrt(5))+(1+sqrt(5))^n*(11+5*sqrt(5))))/sqrt(5). - Colin Barker, Jun 05 2016

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

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 3, 1, 1, 0, 1, 3, 3, 4, 1, 1, 0, 1, 3, 6, 4, 5, 1, 1, 0, 1, 4, 6, 10, 5, 6, 1, 1, 0, 1, 4, 10, 10, 15, 6, 7, 1, 1, 0, 1, 5, 10, 20, 15, 21, 7, 8, 1, 1, 0, 1, 5, 15, 20, 35, 21, 28, 8, 9, 1, 1, 0, 1, 6, 15, 35, 35, 56, 28, 36, 9, 10, 1, 1, 0
Offset: 0

Views

Author

Philippe Deléham, Jan 01 2009

Keywords

Comments

A130595*A153342 as infinite lower triangular matrices. Reflected version of A103631. Another version of A046854. Row sums are Fibonacci numbers (A000045).
A055830*A130595 as infinite lower triangular matrices.

Examples

			Triangle begins:
  1;
  1, 0;
  1, 1, 0;
  1, 1, 1, 0;
  1, 2, 1, 1, 0;
  1, 2, 3, 1, 1, 0;
  1, 3, 3, 4, 1, 1, 0;
  ...
		

Crossrefs

Programs

  • Magma
    /* As triangle */ [[Binomial(Floor((n+k-1)/2),k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Aug 28 2016
  • Mathematica
    Table[Binomial[Floor[(n + k - 1)/2], k], {n, 0, 45}, {k, 0, n}] // Flatten (* G. C. Greubel, Aug 27 2016 *)

Formula

T(n,k) = binomial(floor((n+k-1)/2),k).
Sum_{k=0..n} T(n,k)*x^k = A122335(n-1), A039834(n-2), A000012(n), A000045(n+1), A001333(n), A003688(n), A015448(n), A015449(n), A015451(n), A015453(n), A015454(n), A015455(n), A015456(n), A015457(n) for x = -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 respectively. - Philippe Deléham, Dec 17 2011
Sum_{k=0..n} T(n,k)*x^(n-k) = A152163(n), A000007(n), A000045(n+1), A026597(n), A122994(n+1), A158608(n), A122995(n+1), A158797(n), A122996(n+1), A158798(n), A158609(n) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively. - Philippe Deléham, Dec 17 2011
G.f.: (1+(1-y)*x)/(1-y*x-x^2). - Philippe Deléham, Dec 17 2011
T(n,k) = T(n-1,k-1) + T(n-2,k), T(0,0) = T(1,0) = T(2,0) = T(2,1) = 1, T(1,1) = T(2,2) = 0, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Nov 09 2013

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

A287838 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 8.

Original entry on oeis.org

1, 11, 115, 1205, 12625, 132275, 1385875, 14520125, 152130625, 1593906875, 16699721875, 174966753125, 1833166140625, 19206495171875, 201230782421875, 2108340300078125, 22089556912890625, 231437270629296875, 2424820490857421875, 25405391261720703125
Offset: 0

Views

Author

David Nacin, Jun 07 2017

Keywords

Comments

In general, the number of sequences on {0,1,...,10} such that no two consecutive terms have distance 6+k for k in {0,1,2,3,4} has generating function (-1 - x)/(-1 + 10*x + (2*k+1)*x^2).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{10, 5}, {1, 11, 115}, 20]
  • PARI
    Vec((1 + x) / (1 - 10*x - 5*x^2) + O(x^40)) \\ Colin Barker, Nov 25 2017
  • Python
    def a(n):
     if n in [0,1,2]:
      return [1, 11, 115][n]
     return 10*a(n-1) + 5*a(n-2)
    

Formula

For n > 2, a(n) = 10*a(n-1) + 5*a(n-2), a(0)=1, a(1)=11, a(2)=115.
G.f.: (-1 - x)/(-1 + 10*x + 5*x^2).
a(n) = (((5-sqrt(30))^n*(-6+sqrt(30)) + (5+sqrt(30))^n*(6+sqrt(30)))) / (2*sqrt(30)). - Colin Barker, Nov 25 2017

A122186 First row sum of the 4 X 4 matrix M^n, where M={{10, 9, 7, 4}, {9, 8, 6, 3}, {7, 6, 4, 2}, {4, 3, 2, 1}}.

Original entry on oeis.org

1, 30, 707, 16886, 403104, 9623140, 229729153, 5484227157, 130922641160, 3125460977225, 74612811302754, 1781200165693270, 42521840081752984, 1015105948653689061, 24233196047277585233, 578508865448619225434
Offset: 0

Views

Author

Gary W. Adamson and Roger L. Bagula, Oct 17 2006

Keywords

Comments

These matrices resemble Hankel matrices.

Crossrefs

Cf. A015448.

Programs

  • Maple
    with(linalg): M[1]:=matrix(4,4,[10,9,7,4,9,8,6,3,7,6,4,2,4,3,2,1]): for n from 2 to 15 do M[n]:=multiply(M[1],M[n-1]) od: 1,seq(M[n][1,1]+M[n][1,2]+M[n][1,3]+M[n][1,4],n=1..15);
    a[0]:=1: a[1]:=30: a[2]:=707: a[3]:=16886: for n from 4 to 15 do a[n]:=23*a[n-1]+21*a[n-2]-4*a[n-3]-a[n-4] od: seq(a[n],n=0..15);
  • Mathematica
    M = {{10, 9, 7, 4}, {9, 8, 6, 3}, {7, 6, 4, 2}, {4, 3, 2, 1}}; v[1] = {1, 1, 1, 1}; v[n_] := v[n] = M.v[n - 1]; a1 = Table[v[n][[1]], {n, 1, 50}]

Formula

a(n) = 23a(n-1)+21a(n-2)-4a(n-3)-a(n-4) for n>=4; a(0)=1, a(1)=30, a(2)=707, a(3)=16886 (follows from the minimal polynomial x^4-23x^3-21x^2+4x+1 of the matrix M).
G.f.: -(x^3+4*x^2-7*x-1) / ((x+1)*(x^3+3*x^2-24*x+1)). [Colin Barker, Dec 07 2012]

Extensions

Edited by N. J. A. Sloane, Nov 07 2006

A122187 First row sum of the matrix M^n, where M is the 3 X 3 matrix [[6, 5, 3], [5, 4, 2], [3, 2, 1]] (n>=0).

Original entry on oeis.org

1, 14, 157, 1782, 20216, 229347, 2601899, 29518061, 334876920, 3799116465, 43100270734, 488964567014, 5547212203625, 62932092237197, 713952898856653, 8099663044168346, 91889172989041221, 1042465602157270162
Offset: 1

Views

Author

Gary W. Adamson and Roger L. Bagula, Oct 17 2006

Keywords

Crossrefs

Cf. A015448.

Programs

  • Maple
    a[0]:=1: a[1]:=14: a[2]:=157: for n from 3 to 20 do a[n]:=11*a[n-1]+4*a[n-2]-a[n-3] od: seq(a[n],n=0..20);
  • Mathematica
    M = {{6, 5, 3}, {5, 4, 2}, {3, 2, 1}}; v[1] = {1, 1, 1}; v[n_] := v[n] = M.v[n - 1]; a1 = Table[v[n][[1]], {n, 1, 50}]
    LinearRecurrence[{11,4,-1},{1,14,157},30] (* Harvey P. Dale, Oct 18 2022 *)

Formula

a(n) = 11a(n-1)+4a(n-2)-a(n-3), a(0)=1, a(1)=14, a(2)=157 (derived from the minimal polynomial of the matrix M).
G.f.: -x*(x^2-3*x-1) / (x^3-4*x^2-11*x+1). [Colin Barker, Dec 07 2012]

Extensions

Edited by N. J. A. Sloane, Oct 29 2006

A284732 Square array read by antidiagonals downwards: T(n,k) = number of linear extensions of the North-East rectangular partial order NE_{n,k} that avoid the pattern 2143.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 5, 4, 1, 1, 14, 21, 8, 1, 1, 42, 121, 89, 16, 1, 1, 132, 728, 1094, 377, 32, 1
Offset: 1

Views

Author

N. J. A. Sloane, Apr 07 2017

Keywords

Examples

			The square array begins:
  1,  1,   1,    1,      1, ...
  1,  2,   5,   14,     42, ...
  1,  4,  21,  121,    728, ...
  1,  8,  89, 1094,  14041, ...
  1, 16, 377, 9841, 266110, ...
  ...
As a triangular array:
  1,
  1,   1,
  1,   2,   1,
  1,   5,   4,    1,
  1,  14,  21,    8,   1,
  1,  42, 121,   89,  16,  1,
  1, 132, 728, 1094, 377, 32, 1,
  ...
		

Crossrefs

Cf. A281731.
For early rows and columns see A000108, A000079 and (apparently) A274969, A015448.

A287805 Number of quinary sequences of length n such that no two consecutive terms have distance 2.

Original entry on oeis.org

1, 5, 19, 73, 281, 1083, 4175, 16097, 62065, 239307, 922711, 3557761, 13717913, 52893147, 203943935, 786361409, 3032030689, 11690820555, 45077144455, 173807214241, 670161078089, 2583988659867, 9963272432111, 38416111919777, 148123788152017, 571131629935179
Offset: 0

Views

Author

David Nacin, Jun 01 2017

Keywords

Examples

			For n=2 the a(2)=19=25-6 sequences contain every combination except these six: 02,20,13,31,24,42.
		

Crossrefs

Programs

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

Formula

For n>0, a(n) = 4*a(n-1) + a(n-2) - 6*a(n-3), a(1)=5, a(2)=19, a(3)=73.
G.f.: (1 + x - 2*x^2 - 2*x^3)/(1 - 4*x - x^2 + 6*x^3).
Previous Showing 41-50 of 73 results. Next