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 11-20 of 23 results. Next

A045891 First differences of A045623.

Original entry on oeis.org

1, 1, 3, 7, 16, 36, 80, 176, 384, 832, 1792, 3840, 8192, 17408, 36864, 77824, 163840, 344064, 720896, 1507328, 3145728, 6553600, 13631488, 28311552, 58720256, 121634816, 251658240, 520093696, 1073741824, 2214592512, 4563402752
Offset: 0

Views

Author

Keywords

Comments

Let M_n be the n X n matrix m_(i,j) = 3 + abs(i-j), then det(M_n) =(-1)^(n+1)*a(n+1). - Benoit Cloitre, May 28 2002
If X_1, X_2, ..., X_n are 2-blocks of a (2n+3)-set X then, for n>=1, a(n+2) is the number of (n+1)-subsets of X intersecting each X_i, (i=1..n). - Milan Janjic, Nov 18 2007
Equals row sums of triangle A152194. - Gary W. Adamson, Nov 28 2008
An elephant sequence, see A175655. For the central square 16 A[5] vectors, with decimal values between 19 and 400, lead to this sequence (without the first leading 1). For the corner squares these vectors lead to the companion sequence A045623. - Johannes W. Meijer, Aug 15 2010
a(n) is the total number of runs of 1 in the compositions of n+1. For example, a(3) = A045623(3) - A045623(2) = 12 - 5 = 7 runs of only 1 in the compositions of 4, enumerated "()" as follows: 3,(1); (1),3; 2,(1,1);(1),2,(1); (1,1),2; (1,1,1,1). More generally, the total number of runs of only part k in the compositions of n+k is A045623(n) - A045623(n-k). - Gregory L. Simay, May 02 2017
This is essentially the p-INVERT of (1,1,1,1,1,...) for p(S) = 1 - S - S^2 + S^3; see A291000. - Clark Kimberling, Aug 24 2017

Examples

			G.f. = 1 + x + 3*x^2 + 7*x^3 + 16*x^4 + 36*x^5 + 80*x^6 + ... - _Michael Somos_, Mar 26 2022
		

Crossrefs

Programs

Formula

a(n) = Sum_{k=0..n-2} (k+3)*binomial(n-2,k) for n >= 2. - N. J. A. Sloane, Jan 30 2008
a(n) = (n+4)*2^(n-3), n >= 2, with a(0) = a(1) = 1.
G.f.: (1-x)^3/(1-2*x)^2.
Equals binomial transform of A027656.
Starting 1, 3, 7, 16, ... this is ((n+5)*2^n - 0^n)/4, the binomial transform of (1, 2, 2, 3, 3, ...). - Paul Barry, May 20 2003
From Paul Barry, Nov 29 2004: (Start)
a(n) = ((n+4)*2^(n-1) + 3*C(0, n) - C(1, n))/4;
a(n) = Sum_{k=0..floor(n/2)} C(n, 2*k)*(k+1). (End)
a(n) = A045623(n-1) + 2^(n-2) = A034007(n+1) - 2^(n-2) for n>=2. - Philippe Deléham, Apr 20 2009
G.f.: 1 + Q(0)*x/(1-x)^2, where Q(k)= 1 + (k+1)*x/(1 - x - x*(1-x)/(x + (k+1)*(1-x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 25 2013
a(n) = Sum_{k=0..n} (k+1)*C(n-2,n-k). Peter Luschny, Apr 20 2015
From Amiram Eldar, Jan 13 2021: (Start)
Sum_{n>=0} 1/a(n) = 128*log(2) - 1292/15.
Sum_{n>=0} (-1)^n/a(n) = 782/15 - 128*log(3/2). (End)
E.g.f.: (2 - x + exp(2*x)*(2 + x))/4. - Stefano Spezia, Mar 26 2022

A105476 Number of compositions of n when each even part can be of two kinds.

Original entry on oeis.org

1, 1, 3, 6, 15, 33, 78, 177, 411, 942, 2175, 5001, 11526, 26529, 61107, 140694, 324015, 746097, 1718142, 3956433, 9110859, 20980158, 48312735, 111253209, 256191414, 589951041, 1358525283, 3128378406, 7203954255, 16589089473, 38200952238, 87968220657
Offset: 0

Views

Author

Emeric Deutsch, Apr 09 2005

Keywords

Comments

Row sums of A105475.
Starting (1, 3, 6, 15, ...) = sum of (n-1)-th row terms of triangle A140168. - Gary W. Adamson, May 10 2008
a(n) is also the number of compositions of n using 1's and 2's such that each run of like numbers can be grouped arbitrarily. For example, a(4) = 15 because 4 = (1)+(1)+(1)+(1) = (1+1)+(1)+(1) = (1)+(1+1)+(1) = (1)+(1)+(1+1) = (1+1)+(1+1) = (1+1+1)+(1) = (1)+(1+1+1) = (1+1+1+1) = (2)+(1)+(1) = (1)+(2)+(1) = (1)+(1)+(2) = (2)+(1+1) = (1+1)+(2) = (2)+(2) = (2+2). - Martin J. Erickson (erickson(AT)truman.edu), Dec 09 2008
An elephant sequence, see A175655. For the central square four A[5] vectors, with decimal values 69, 261, 321 and 324, lead to this sequence (without the first leading 1). For the corner squares these vectors lead to the companion sequence A006138. - Johannes W. Meijer, Aug 15 2010
Inverse INVERT transform of the left shifted sequence gives A000034.
Eigensequence of the triangle
1,
2, 1,
1, 2, 1,
2, 1, 2, 1,
1, 2, 1, 2, 1,
2, 1, 2, 1, 2, 1,
1, 2, 1, 2, 1, 2, 1,
2, 1, 2, 1, 2, 1, 2, 1 ... - Paul Barry, Feb 10 2011
Pisano period lengths: 1, 3, 1, 6, 24, 3, 24, 6, 1, 24, 120, 6, 156, 24, 24, 12, 16, 3, 90, 24, ... - R. J. Mathar, Aug 10 2012

Examples

			a(3)=6 because we have (3),(1,2),(1,2'),(2,1),(2',1) and (1,1,1).
		

Crossrefs

Programs

  • GAP
    a:=[1,3];; for n in [3..40] do a[n]:=a[n-1]+3*a[n-2]; od; Concatenation([1], a); # G. C. Greubel, Jan 15 2020
  • Magma
    I:=[1,1,3]; [n le 3 select I[n] else Self(n-1)+3*Self(n-2): n in [1..35]]; // Vincenzo Librandi, Jul 21 2013
    
  • Magma
    R:=PowerSeriesRing(Integers(), 33); Coefficients(R!( 1/(1-(x/(1-x))-x^2/(1-x^2)))); // Marius A. Burtea, Jan 15 2020
    
  • Maple
    G:=(1-z^2)/(1-z-3*z^2): Gser:=series(G,z=0,35): 1,seq(coeff(Gser,z^n),n=1..33);
  • Mathematica
    CoefficientList[Series[(1-x^2)/(1-x-3x^2), {x,0,35}], x] (* or *) Join[{1}, LinearRecurrence[{1, 3}, {1, 3}, 50]] (* Vladimir Joseph Stephan Orlovsky, Jul 17 2011; typo fixed by Vincenzo Librandi, Jul 21 2013 *)
    Table[Round[Sqrt[3]^(n-3)*(2*Sqrt[3]*Fibonacci[n+1, 1/Sqrt[3]] +Fibonacci[n, 1/Sqrt[3]])], {n, 0, 40}] (* G. C. Greubel, Jan 15 2020 *)
  • PARI
    Vec((1-x^2)/(1-x-3*x^2)+O(x^40)) \\ Charles R Greathouse IV, Jun 13 2013
    
  • Sage
    def A105476_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-x^2)/(1-x-3*x^2) ).list()
    A105476_list(40) # G. C. Greubel, Jan 15 2020
    

Formula

G.f.: (1-x^2) / (1-x-3*x^2).
a(n) = a(n-1) + 3*a(n-2) for n>=3.
a(n) = 3*A006138(n-2), n>=2.
a(n) = ((2+sqrt(13))*(1+sqrt(13))^n - (2-sqrt(13))*(1-sqrt(13))^n)/(3*2^n*sqrt(13)) for n>0. - Bruno Berselli, May 24 2011
G.f.: 1/(1 - Sum_{k>=1} x^k*(1+x^k) ). - Joerg Arndt, Mar 09 2014
G.f.: 1/(1 - (x/(1-x)) - x^2/(1-x^2)) = 1/(1 - (x+2*x^2+x^3+2*x^4+x^5+2*x^6+...) ); in general 1/(1 - Sum_{j>=1} m(j)*x^j ) is the g.f. for compositions with m(k) sorts of part k. - Joerg Arndt, Feb 16 2015
a(n) = 3^((n-1)/2)*( 2*sqrt(3)*Fibonacci(n, 1/sqrt(3)) + Fibonacci(n, 1/sqrt(3)) ). - G. C. Greubel, Jan 15 2020
E.g.f.: 1/3 + (2/39)*exp(x/2)*(13*cosh((sqrt(13)*x)/2) + 2*sqrt(13)*sinh((sqrt(13)*x)/2)). - Stefano Spezia, Jan 15 2020

A175654 Eight bishops and one elephant on a 3 X 3 chessboard. G.f.: (1 - x - x^2)/(1 - 3*x - x^2 + 6*x^3).

Original entry on oeis.org

1, 2, 6, 14, 36, 86, 210, 500, 1194, 2822, 6660, 15638, 36642, 85604, 199626, 464630, 1079892, 2506550, 5811762, 13462484, 31159914, 72071654, 166599972, 384912086, 888906306, 2052031172, 4735527306, 10925175254, 25198866036, 58108609526, 133973643090
Offset: 0

Views

Author

Johannes W. Meijer, Aug 06 2010; edited Jun 21 2013

Keywords

Comments

a(n) represents 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 bishop on the eight side and corner squares but on the center square the bishop flies into a rage and turns into a raging elephant.
In chaturanga, the old Indian version of chess, one of the pieces was called gaja, elephant in Sanskrit. The Arabs called the game shatranj and the elephant became el fil in Arabic. In Spain chess became chess as we know it today but surprisingly in Spanish a bishop isn't a Christian bishop but a Moorish elephant and it still goes by its original name of el alfil.
On a 3 X 3 chessboard there are 2^9 = 512 ways for an elephant to fly into a rage on the central square (off the center the piece behaves like a normal bishop). The elephant is represented by the A[5] vector in the fifth row of the adjacency matrix A, see the Maple program and A180140. For the corner squares the 512 elephants lead to 46 different elephant sequences, see the overview of elephant sequences and the crossreferences.
The sequence above corresponds to 16 A[5] vectors with decimal values 71, 77, 101, 197, 263, 269, 293, 323, 326, 329, 332, 353, 356, 389, 449 and 452. These vectors lead for the side squares to A000079 and for the central square to A175655.

References

  • Gary Chartrand, Introductory Graph Theory, pp. 217-221, 1984.
  • David Hooper and Kenneth Whyld, The Oxford Companion to Chess, pp. 74, 366, 1992.

Crossrefs

Cf. Elephant sequences corner squares [decimal value A[5]]: A040000 [0], A000027 [16], A000045 [1], A094373 [2], A000079 [3], A083329 [42], A027934 [11], A172481 [7], A006138 [69], A000325 [26], A045623 [19], A000129 [21], A095121 [170], A074878 [43], A059570 [15], A175654 [71, this sequence], A026597 [325], A097813 [58], A057711 [27], 2*A094723 [23; n>=-1], A002605 [85], A175660 [171], A123203 [186], A066373 [59], A015518 [341], A134401 [187], A093833 [343].

Programs

  • Magma
    [n le 3 select Factorial(n) else 3*Self(n-1) +Self(n-2) -6*Self(n-3): n in [1..41]]; // G. C. Greubel, Dec 08 2021
    
  • Maple
    nmax:=28; m:=1; A[1]:=[0,0,0,0,1,0,0,0,1]: A[2]:=[0,0,0,1,0,1,0,0,0]: A[3]:=[0,0,0,0,1,0,1,0,0]: A[4]:=[0,1,0,0,0,0,0,1,0]: A[5]:=[0,0,1,0,0,0,1,1,1]: A[6]:=[0,1,0,0,0,0,0,1,0]: A[7]:=[0,0,1,0,1,0,0,0,0]: A[8]:=[0,0,0,1,0,1,0,0,0]: A[9]:=[1,0,0,0,1,0,0,0,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[{3,1,-6}, {1,2,6}, 80] (* Vladimir Joseph Stephan Orlovsky, Feb 21 2012 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; -6,1,3]^n*[1;2;6])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
    
  • Sage
    [( (1-x-x^2)/((1-2*x)*(1-x-3*x^2)) ).series(x,n+1).list()[n] for n in (0..40)] # G. C. Greubel, Dec 08 2021

Formula

G.f.: (1 - x - x^2)/(1 - 3*x - x^2 + 6*x^3).
a(n) = 3*a(n-1) + a(n-2) - 6*a(n-3) with a(0)=1, a(1)=2 and a(2)=6.
a(n) = ((6+10*A)*A^(-n-1) + (6+10*B)*B^(-n-1))/13 - 2^n with A = (-1+sqrt(13))/6 and B = (-1-sqrt(13))/6.
Limit_{k->oo} a(n+k)/a(k) = (-1)^(n)*2*A000244(n)/(A075118(n) - A006130(n-1)*sqrt(13)).
a(n) = b(n) - b(n-1) - b(n-2), where b(n) = Sum_{k=1..n} Sum_{j=0..k} binomial(j,n-3*k+2*j)*(-6)^(k-j)*binomial(k,j)*3^(3*k-n-j), n>0, b(0)=1, with a(0) = b(0), a(1) = b(1) - b(0). - Vladimir Kruchinin, Aug 20 2010
a(n) = 2*A006138(n) - 2^n = 2*(A006130(n) + A006130(n-1)) - 2^n. - G. C. Greubel, Dec 08 2021
E.g.f.: 2*exp(x/2)*(13*cosh(sqrt(13)*x/2) + 3*sqrt(13)*sinh(sqrt(13)*x/2))/13 - cosh(2*x) - sinh(2*x). - Stefano Spezia, Feb 12 2023

A099036 a(n) = 2^n - Fibonacci(n).

Original entry on oeis.org

1, 1, 3, 6, 13, 27, 56, 115, 235, 478, 969, 1959, 3952, 7959, 16007, 32158, 64549, 129475, 259560, 520107, 1041811, 2086206, 4176593, 8359951, 16730848, 33479407, 66987471, 134021310, 268117645, 536356683, 1072909784, 2146137379, 4292788987, 8586410014
Offset: 0

Views

Author

Paul Barry, Sep 23 2004

Keywords

Comments

Binomial transform of (-1)^n*A000045(n) + 1 = (-1)^n*A008346(n).
Number of compositions of n+1 that contain 1 as a part. - Vladeta Jovovic, Sep 26 2004
Generated from iterates of M * [1,1,1,...], where M = a tridiagonal matrix with [0,1,1,1,...] as the main diagonal, [1,1,1,...] as the superdiagonal and [1,0,0,0,...] as the subdiagonal. - Gary W. Adamson, Jan 05 2009
Starting with offset 1, generated from iterates of M * [1,1,1,...], M*ANS -> M*ANS,...; where M = = a tridiagonal matrix with (0,1,1,1,...) in the main diagonal, (1,1,1,...) in the superdiagonal and (1,0,0,0,...) in the subdiagonal. - Gary W. Adamson, Jan 04 2009
An elephant sequence, see A175655. For the central square 24 A[5] vectors, with decimal values between 11 and 416, lead to this sequence (without the first leading 1). For the corner squares these vectors lead to the companion sequence A027934 (without the leading 0). - Johannes W. Meijer, Aug 15 2010
Number of fixed points in all compositions of n+1. - Alois P. Heinz, Jun 18 2020

Crossrefs

Programs

Formula

G.f.: (1 - x)^2/((1 - 2*x)*(1 - x - x^2)).
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3).
a(n) = A101220(1,2,n+1) - A101220(1,2,n). - Ross La Haye, Aug 05 2005
a(n) = A000079(n+1) - A117591(n) = A117591(n) - 2 * A000045(n). - Reinhard Zumkeller, Aug 15 2013
a(n) = Sum_{t_1+2*t_2+...+n*t_n = n} multinomial(1+t_1+t_2+...+t_n, 1+t_1, t_2, ..., t_n). - Mircea Merca, Oct 09 2013
a(n) = Sum_{k=0..A003056(n+1)} k * A238350(n+1,k). - Alois P. Heinz, Jun 18 2020
E.g.f.: cosh(2*x) + sinh(2*x) - 2*exp(x/2)*sinh(sqrt(5)*x/2)/sqrt(5). - Stefano Spezia, Jan 31 2023

Extensions

More terms from Ross La Haye, Aug 05 2005

A087447 a(0) = a(1) = 1; for n > 1, a(n) = (n+2)*2^(n-2).

Original entry on oeis.org

1, 1, 4, 10, 24, 56, 128, 288, 640, 1408, 3072, 6656, 14336, 30720, 65536, 139264, 294912, 622592, 1310720, 2752512, 5767168, 12058624, 25165824, 52428800, 109051904, 226492416, 469762048, 973078528, 2013265920, 4160749568
Offset: 0

Views

Author

Paul Barry, Sep 05 2003

Keywords

Comments

Binomial transform of A005408 (with interpolated zeros). Binomial transform is A087448. a(n+2) = 2*A045623(n+1); a(n+1) = A001792(n) + (0^n - (-2)^n)/2. The sequence 1,4,10,... given by 2^n*(n+3)/2 - 0^n/2 is the binomial transform of 1,3,3,5,5,...
Equals real part of binomial transform of [1, 2*i, 3, 4*i, 5, 6*i, ...]; i=sqrt(-1). - Gary W. Adamson, Sep 21 2008
An elephant sequence, see A175655. For the central square 24 A[5] vectors, with decimal values between 27 and 432, lead to this sequence (without the first leading 1). For the corner squares these vectors lead to the companion sequence A057711 (without the leading 0). - Johannes W. Meijer, Aug 15 2010

Crossrefs

Essentially same as A079859.

Programs

  • Mathematica
    Join[{1, 1}, Table[(n + 2) 2^(n - 2), {n, 2, 30}]]  (* Harvey P. Dale, Feb 22 2011 *)
  • Python
    def A087447(n): return n+2<1 else 1 # Chai Wah Wu, Oct 03 2024

Formula

a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2k)*(2k+1). - Paul Barry, Nov 29 2004
From Colin Barker, Mar 23 2012: (Start)
G.f.: (1-x)*(1-2*x+2*x^2)/(1-2*x)^2.
a(n) = 4*a(n-1) - 4*a(n-2) for n > 3. (End)
E.g.f.: (1 - x + exp(2*x)*(1 + x))/2. - Stefano Spezia, Jan 31 2023

Extensions

Definition corrected (by a factor of 2) by R. J. Mathar, Feb 21 2009

A168604 a(n) = 2^(n-2) - 1.

Original entry on oeis.org

1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, 2147483647, 4294967295, 8589934591
Offset: 3

Views

Author

Martin Griffiths, Dec 01 2009

Keywords

Comments

Number of ways of partitioning the multiset {1,1,1,2,3,...,n-2} into exactly two nonempty parts.
An elephant sequence, see A175655. For the central square six A[5] vectors, with decimal values between 26 and 176, lead to this sequence. For the corner squares these vectors lead to the companion sequence A000325 (without the first leading 1). - Johannes W. Meijer, Aug 15 2010

Examples

			The partitions of {1,1,1,2,3} into exactly two nonempty parts are {{1},{1,1,2,3}}, {{2},{1,1,1,3}}, {{3},{1,1,1,2}}, {{1,1},{1,2,3}}, {{1,2},{1,1,3}}, {{1,3},{1,1,2}} and {{2,3},{1,1,1}}.
		

Crossrefs

The number of ways of partitioning the multiset {1, 1, 1, 2, 3, ..., n-1} into exactly three and four nonempty parts are given in A168605 and A168606, respectively.

Programs

Formula

E.g.f.: 2*exp(2*x)-exp(x).
a(n) = A000225(n-2).
G.f.: x^3/((1-x)*(1-2*x))
a(n) = A126646(n-3). - R. J. Mathar, Dec 11 2009
a(n) = 3*a(n-1) - 2*a(n-2). - Arkadiusz Wesolowski, Jun 14 2013
a(n) = A000918(n-2) + 1. - Miquel Cerda, Aug 09 2016

A172481 a(n) = (3*n*2^n+2^(n+4)+2*(-1)^n)/18.

Original entry on oeis.org

1, 2, 5, 11, 25, 55, 121, 263, 569, 1223, 2617, 5575, 11833, 25031, 52793, 111047, 233017, 487879, 1019449, 2126279, 4427321, 9204167, 19107385, 39612871, 82021945, 169636295, 350457401, 723284423, 1491308089, 3072094663, 6323146297, 13004206535, 26724240953
Offset: 0

Views

Author

Paul Curtz, Feb 04 2010

Keywords

Comments

The binomial transform is in A126184.
An elephant sequence, see A175654 and A175655. There are 24 A[5] vectors, with decimal values between 7 and 448, that lead for the corner squares to this sequence. Its companion sequence for the central square is A175656. Furthermore there are 36 A[5] vectors, with decimal values between 15 and 480, that lead for the central square to four times this sequence for n >= -1. Its companion sequence for the corner squares is A059570. - Johannes W. Meijer, Aug 15 2010
a(n) is also the number of runs of weakly increasing parts in all compositions of n+1. a(2) = 5: (111), (12), (2)(1), (3). - Alois P. Heinz, Apr 30 2017

Crossrefs

Programs

  • Magma
    [(3*n*2^n+2^(n+4)+2*(-1)^n)/18: n in [0..40]]; // Vincenzo Librandi, Aug 04 2011
    
  • Mathematica
    Table[(3n 2^n+2^(n+4)+2(-1)^n)/18,{n,0,40}]  (* or *)
    CoefficientList[Series[(1-x-x^2)/((1+x)(1-2x)^2), {x,0,40}], x]  (* Harvey P. Dale, Mar 28 2011 *)
  • PARI
    a(n)=(3*n*2^n+2^(n+4)+2*(-1)^n)/18 \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f.: (1-x-x^2)/((1+x)*(1-2*x)^2).
a(n) = A001045(n-1)+2*a(n-1), n>0.
a(n)+A139790(n) = 2^(n+1) = A000079(n+1).
a(n) = A139790(n)+A140960(n).
a(n) = A001045(n)+(-1)^n*A084219(n).
a(n) = A127984(n) + 2^(n-1). Application: Problem 11623, AMM 119 (2012) 161. - Stephen J. Herschkorn, Feb 11 2012

Extensions

Definition replaced by explicit formula by R. J. Mathar, Feb 11 2010

A098156 Interleave n+1 and 2n+1 and take binomial transform.

Original entry on oeis.org

1, 2, 5, 13, 32, 76, 176, 400, 896, 1984, 4352, 9472, 20480, 44032, 94208, 200704, 425984, 901120, 1900544, 3997696, 8388608, 17563648, 36700160, 76546048, 159383552, 331350016, 687865856, 1426063360, 2952790016, 6106906624
Offset: 0

Views

Author

Paul Barry, Aug 29 2004

Keywords

Comments

Binomial transform of A029579.
An elephant sequence, see A175655. For the central square 16 A[5] vectors, with decimal values between 59 and 440, lead to this sequence (without a(1)). For the corner squares these vectors lead to the companion sequence A066373 (with a leading 1 added). - Johannes W. Meijer, Aug 15 2010

Programs

  • GAP
    Concatenation([1,2], List([2..40], n-> 2^(n-3)*(3*n+4))); # G. C. Greubel, May 08 2019
  • Magma
    [1,2] cat [2^(n-3)*(3*n+4): n in [2..40]]; // G. C. Greubel, May 08 2019
    
  • Mathematica
    CoefficientList[Series[(1-2x+x^2+x^3)/(1-2x)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Jul 21 2013 *)
    LinearRecurrence[{4,-4},{1,2,5,13},50] (* Harvey P. Dale, Dec 03 2023 *)
  • PARI
    {a(n) = if(n==0,1, if(n==1,2, 2^(n-3)*(3*n+4)))}; \\ G. C. Greubel, May 08 2019
    
  • Sage
    [1,2]+[2^(n-3)*(3*n+4) for n in (2..40)] # G. C. Greubel, May 08 2019
    

Formula

G.f.: (1-2*x+x^2+x^3)/(1-2*x)^2.
a(n) = (2 * 0^n + Sum_{k=0..n} (-1)^(n-k)*k*binomial(n,k) + 2^(n+1) + 3*n*2^(n-1) )/4.
a(n) = Sum_{j=0..n} Sum_{k=0..n} binomial(n, 2*(k-j)).
a(n) = Sum_{k=0..n} Sum_{j=0..k} C(n, 2*j). - Paul Barry, Jan 13 2005
a(n) = 2^(n-3)*(3*n+4) for n>=2. - Philip B. Zhang, May 25 2016
E.g.f.: (2 + x + (2 + 3*x)*exp(2*x))/4. - Ilya Gutkovskiy, May 31 2016

A175656 Eight bishops and one elephant on a 3 X 3 chessboard. G.f.: (1-3*x^2)/(1-3*x+4*x^3).

Original entry on oeis.org

1, 3, 6, 14, 30, 66, 142, 306, 654, 1394, 2958, 6258, 13198, 27762, 58254, 121970, 254862, 531570, 1106830, 2301042, 4776846, 9903218, 20505486, 42409074, 87614350, 180821106, 372827022, 768023666, 1580786574, 3251051634
Offset: 0

Views

Author

Johannes W. Meijer, Aug 06 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 24 A[5] vectors with decimal values 7, 13, 37, 67, 70, 73, 76, 97, 100, 133, 193, 196, 259, 262, 265, 268, 289, 292, 322, 328, 352, 385, 388 and 448. These vectors lead for the side squares to A000079 and for the corner squares to A172481.

Crossrefs

Cf. A175655 (central square).

Programs

  • Magma
    [((3*n+22)*2^n-4*(-1)^n)/18: n in [0..40]]; // Vincenzo Librandi, Aug 04 2011
    
  • Maple
    with(LinearAlgebra): nmax:=29; m:=5; A[5]:= [0,0,0,0,0,0,1,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 - 3 x^2)/(1 - 3 x + 4 x^3), {x, 0, 29}], x] (* Michael De Vlieger, Nov 02 2018 *)
    LinearRecurrence[{3,0,-4},{1,3,6},30] (* Harvey P. Dale, Aug 12 2020 *)
  • PARI
    vector(40, n, n--; ((3*n+22)*2^n - 4*(-1)^n)/18) \\ G. C. Greubel, Nov 03 2018

Formula

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

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

Original entry on oeis.org

1, 4, 8, 18, 38, 80, 166, 342, 700, 1426, 2894, 5856, 11822, 23822, 47932, 96330, 193414, 388048, 778070, 1559334, 3123836, 6256034, 12525598, 25073088, 50181598, 100420510, 200933756, 402017562, 804277910, 1608948656, 3218532934
Offset: 0

Views

Author

Johannes W. Meijer, Aug 06 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 16 A[5] vectors with decimal values 43, 46, 106, 139, 142, 163, 166, 169, 172, 202, 226, 232, 298, 394, 418 and 424. These vectors lead for the side squares to A000079 and for the corner squares to A074878 (a(n)=3*2^n-2*F(n+2)).

Crossrefs

Cf. A000045, A000079, A074878, A175654, A175655 (central square).

Programs

  • Magma
    I:=[1,4,8]; [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
    with(LinearAlgebra): nmax:=30; m:=5; A[5]:= [0,0,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
    LinearRecurrence[{3,-1,-2},{1,4,8},40] (* Harvey P. Dale, Aug 12 2012 *)
    CoefficientList[Series[(1 + x - 3 x^2) / (1 - 3 x + x^2 + 2 x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 21 2013 *)

Formula

G.f.: (1+x-3*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)=4 and a(2)=8.
Previous Showing 11-20 of 23 results. Next