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.

A175661 Eight bishops and one elephant on a 3 X 3 chessboard: a(n) = 2^(n+2)-3*F(n+1), with F(n) = A000045(n).

Original entry on oeis.org

1, 5, 10, 23, 49, 104, 217, 449, 922, 1883, 3829, 7760, 15685, 31637, 63706, 128111, 257353, 516536, 1036033, 2076857, 4161466, 8335475, 16691245, 33415328, 66883789, 133853549, 267846202, 535917479, 1072199137, 2144987528
Offset: 0

Views

Author

Johannes W. Meijer, Aug 06 2010, Aug 10 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 bishop on the eight side and corner squares but on the central square the bishop turns into a raging elephant, see A175654.
The sequence above corresponds to four A[5] vectors with decimal values 171, 174, 234 and 426. These vectors lead for the side squares to A000079 and for the corner squares to A175660 (a(n)=2^(n+2)-3*F(n+2)).

Crossrefs

Cf. A175655 (central square), A000045.
Cf. A027973 (2^(n+2)+F(n)-F(n+4)), A099036 (2^n-F(n)), A167821 (2^(n+1)-2*F(n+2)), A175657 (3*2^n-2*F(n+1)), A175660 (2^(n+2)-3*F(n+2)), A179610 (convolution of (-4)^n and F(n+1)).

Programs

  • Magma
    I:=[1,5,10]; [n le 3 select I[n] else 3*Self(n-1)-Self(n-2)-2*Self(n-3): n in [1..35]]; // Vincenzo Librandi, Jul 21 2013
  • Maple
    nmax:=29; m:=5; A[5]:= [0,1,0,1,0,1,0,1,1]: A:=Matrix([[0,0,0,0,1,0,0,0,1], [0,0,0,1,0,1,0,0,0], [0,0,0,0,1,0,1,0,0], [0,1,0,0,0,0,0,1,0], A[5], [0,1,0,0,0,0,0,1,0], [0,0,1,0,1,0,0,0,0], [0,0,0,1,0,1,0,0,0], [1,0,0,0,1,0,0,0,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
    CoefficientList[Series[(1 + 2 x - 4 x^2) / (1 - 3 x + x^2 + 2 x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 21 2013 *)
    LinearRecurrence[{3,-1,-2},{1,5,10},30] (* Harvey P. Dale, Apr 15 2019 *)

Formula

G.f.: (1 + 2*x - 4*x^2)/(1 - 3*x + x^2 + 2*x^3).
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) with a(0)=1, a(1)=5 and a(2)=10.

A316937 a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) for n > 2, a(0)=3, a(1)=10, a(2)=26.

Original entry on oeis.org

3, 10, 26, 62, 140, 306, 654, 1376, 2862, 5902, 12092, 24650, 50054, 101328, 204630, 412454, 830076, 1668514, 3350558, 6723008, 13481438, 27020190, 54133116, 108416282, 217075350, 434543536, 869722694, 1740473846, 3482611772, 6967916082, 13940188782, 27887426720
Offset: 0

Views

Author

Vincenzo Librandi, Jul 17 2018

Keywords

Comments

Row sums of triangle A316938.

Crossrefs

Programs

  • GAP
    List([0..35],n->13*2^n-2*Fibonacci(n+5)); # Muniru A Asiru, Jul 22 2018
    
  • Magma
    I:=[3, 10, 26]; [n le 3 select I[n] else 3*Self(n-1)-Self(n-2)-2*Self(n-3): n in [1..40]];
    
  • Magma
    [((2^(-n)*(65*4^n + (1-Sqrt(5))^n*(-25 + 11*Sqrt(5)) - (1 + Sqrt(5))^n*(25 + 11*Sqrt(5)))) / 5): n in [0..20]]; // Vincenzo Librandi, Aug 24 2018
  • Maple
    seq(coeff(series((3+x-x^2)/((1-2*x)*(1-x-x^2)), x,n+1),x,n),n=0..35); # Muniru A Asiru, Jul 22 2018
  • Mathematica
    CoefficientList[Series[(3 + x - x^2) / ((1 - 2 x) (1 - x - x^2)), {x, 0, 33}], x] (* or *) RecurrenceTable[{a[n]==3 a[n-1] - a[n-2] - 2 a[n-3], a[0]==3, a[1]==10, a[2]==26}, a, {n, 0, 40}]
    f[n_] := 13*2^n - 2 Fibonacci[n + 5]; Array[f, 32, 0] (* or *)
    LinearRecurrence[{3, -1, -2}, {3, 10, 26}, 32] (* Robert G. Wilson v, Jul 21 2018 *)
  • PARI
    Vec((3 + x - x^2) / ((1 - 2*x)*(1 - x - x^2)) + O(x^40)) \\ Colin Barker, Jul 22 2018
    

Formula

G.f.: (3 + x - x^2) / ((1 - 2*x)*(1 - x - x^2)).
a(n) = 13*2^n - 2*Fibonacci(n+5) for n>0.
a(n) = (2^(-n)*(65*4^n + (1-sqrt(5))^n*(-25+11*sqrt(5)) - (1+sqrt(5))^n*(25+11*sqrt(5)))) / 5. - Colin Barker, Jul 22 2018

A167826 a(n) is the number of n-tosses having a run of 3 or more heads and a run of 3 or more tails for a fair coin.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 8, 26, 74, 194, 482, 1152, 2674, 6068, 13524, 29704, 64460, 138482, 294988, 623834, 1311086, 2740666, 5702270, 11815752, 24395678, 50209572, 103048168, 210965064, 430938832, 878534170
Offset: 1

Views

Author

V.J. Pohjola, Nov 13 2009

Keywords

Crossrefs

Programs

  • Mathematica
    b[1] = 0; b[2] = 1; b[3] = 1; b[n_]: = b[n-1] + b[n-2] + b[n-3]; Table[2^n - 2*(Sum[b[n + 3 - i], {i, 1, 3}] - Fibonacci[n + 1]), {n, 1, 30}]
    LinearRecurrence[{4, -3, -3, 0, 3, 2}, {0, 0, 0, 0, 0, 2}, 50] (* G. C. Greubel, Jun 27 2016 *)

Formula

a(n) = 2^n - 2*(tribonacci(n+3) - Fibonacci(n+1)), where tribonacci = A000073.
From R. J. Mathar, Feb 06 2010: (Start)
a(n) = 4*a(n-1) - 3*a(n-2) - 3*a(n-3) + 3*a(n-5) + 2*a(n-6).
G.f.: -2*x^6/((2*x-1)*(x^2+x-1)*(x^3+x^2+x-1)). (End)

A265725 Number of binary strings of length n having at least one run of length at least 4.

Original entry on oeis.org

0, 0, 0, 0, 2, 6, 16, 40, 94, 214, 476, 1040, 2242, 4782, 10112, 21232, 44318, 92046, 190364, 392264, 805746, 1650518, 3372816, 6877656, 13998142, 28442918, 57707324, 116925600, 236630274, 478372062, 966145664, 1949583456, 3930972094, 7920443038, 15948482236
Offset: 0

Views

Author

Jeffrey Shallit, Dec 14 2015

Keywords

Comments

A "run" is a contiguous block of consecutive identical terms.

Examples

			For n=5 there are 6 such strings: 00000, 00001, 01111, and their complements.
		

Crossrefs

Programs

  • PARI
    x='x+O('x^100); concat(vector(4), Vec(2*x^4/((2*x-1)*(x^3+x^2+x-1)))) \\ Altug Alkan, Dec 14 2015

Formula

a(n) = 2^n - 2*A000073(n+2).
a(n) = 2*A050231(n-1) for n>0.
G.f.: 2*x^4/((2*x-1)*(x^3+x^2+x-1)). - Alois P. Heinz, Dec 14 2015

Extensions

More terms from Alois P. Heinz, Dec 14 2015
Showing 1-4 of 4 results.