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
- Gary Chartrand, Introductory Graph Theory, pp. 217-221, 1984.
- David Hooper and Kenneth Whyld, The Oxford Companion to Chess, pp. 74, 366, 1992.
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Viswanathan Anand, The Indian Defense, Time, Jun 19 2008.
- Vladimir Kruchinin, Composition of ordinary generating functions, arXiv:1009.2565 [math.CO], 2010.
- Johannes W. Meijer, The elephant sequences.
- Wikipedia, War Elephant.
- Index entries for linear recurrences with constant coefficients, signature (3,1,-6).
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].
-
[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
-
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);
-
LinearRecurrence[{3,1,-6}, {1,2,6}, 80] (* Vladimir Joseph Stephan Orlovsky, Feb 21 2012 *)
-
a(n)=([0,1,0; 0,0,1; -6,1,3]^n*[1;2;6])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
-
[( (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
A074829
Triangle formed by Pascal's rule, except that the n-th row begins and ends with the n-th Fibonacci number.
Original entry on oeis.org
1, 1, 1, 2, 2, 2, 3, 4, 4, 3, 5, 7, 8, 7, 5, 8, 12, 15, 15, 12, 8, 13, 20, 27, 30, 27, 20, 13, 21, 33, 47, 57, 57, 47, 33, 21, 34, 54, 80, 104, 114, 104, 80, 54, 34, 55, 88, 134, 184, 218, 218, 184, 134, 88, 55, 89, 143, 222, 318, 402, 436, 402, 318, 222, 143, 89
Offset: 1
The first and second Fibonacci numbers are 1, 1, so the first and second rows of the triangle are 1; 1 1; respectively. The third row of the triangle begins and ends with the third Fibonacci number, 2 and the middle term is the sum of the contiguous two terms in the second row, i.e., 1 + 1 = 2, so the third row is 2 2 2.
Triangle begins:
1;
1, 1;
2, 2, 2;
3, 4, 4, 3;
5, 7, 8, 7, 5;
8, 12, 15, 15, 12, 8;
13, 20, 27, 30, 27, 20, 13;
21, 33, 47, 57, 57, 47, 33, 21;
34, 54, 80, 104, 114, 104, 80, 54, 34;
...
Formatted as a symmetric triangle:
1;
1, 1;
2, 2, 2;
3, 4, 4, 3;
5, 7, 8, 7, 5;
8, 12, 15, 15, 12, 8;
13, 20, 27, 30, 27, 20, 13;
21, 33, 47, 57, 57, 47, 33, 21;
34, 54, 80, 104, 114, 104, 80, 54, 34;
-
T:= function(n,k)
if k=1 then return Fibonacci(n);
elif k=n then return Fibonacci(n);
else return T(n-1,k-1) + T(n-1,k);
fi;
end;
Flat(List([1..15], n-> List([1..n], k-> T(n,k) ))); # G. C. Greubel, Jul 12 2019
-
a074829 n k = a074829_tabl !! (n-1) !! (k-1)
a074829_row n = a074829_tabl !! (n-1)
a074829_tabl = map fst $ iterate
(\(u:_, vs) -> (vs, zipWith (+) ([u] ++ vs) (vs ++ [u]))) ([1], [1,1])
-- Reinhard Zumkeller, Aug 15 2013
-
A074829 := proc(n,k)
option remember ;
if k=1 or k=n then
combinat[fibonacci](n) ;
else
procname(n-1,k-1)+procname(n-1,k) ;
end if;
end proc:
seq(seq(A074829(n,k),k=1..n),n=1..12) ; # R. J. Mathar, Mar 31 2025
-
T[n_, 1]:= Fibonacci[n]; T[n_, n_]:= Fibonacci[n]; T[n_, k_]:= T[n-1, k-1] + T[n-1, k]; Table[T[n, k], {n, 1, 12}, {k, 1, n}]//Flatten (* G. C. Greubel, Jul 12 2019 *)
-
T(n,k) = if(k==1 || k==n, fibonacci(n), T(n-1,k-1) + T(n-1,k));
for(n=1,12, for(k=1,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Jul 12 2019
-
def T(n, k):
if (k==1 or k==n): return fibonacci(n)
else: return T(n-1, k-1) + T(n-1, k)
[[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Jul 12 2019
A011794
Triangle defined by T(n+1, k) = T(n, k-1) + T(n-1, k), T(n,1) = 1, T(1,k) = 1, T(2,k) = min(2,k).
Original entry on oeis.org
1, 1, 2, 1, 2, 3, 1, 3, 4, 5, 1, 3, 6, 7, 8, 1, 4, 7, 11, 12, 13, 1, 4, 10, 14, 19, 20, 21, 1, 5, 11, 21, 26, 32, 33, 34, 1, 5, 15, 25, 40, 46, 53, 54, 55, 1, 6, 16, 36, 51, 72, 79, 87, 88, 89, 1, 6, 21, 41, 76, 97, 125, 133, 142, 143, 144, 1, 7, 22, 57, 92, 148, 176, 212, 221, 231, 232, 233
Offset: 1
matrix(10,10,n,k,a(n-1,k-1))
[ 0 0 0 0 0 0 0 0 0 0 ]
[ 0 1 1 1 1 1 1 1 1 1 ]
[ 0 1 2 2 2 2 2 2 2 2 ]
[ 0 1 2 3 3 3 3 3 3 3 ]
[ 0 1 3 4 5 5 5 5 5 5 ]
[ 0 1 3 6 7 8 8 8 8 8 ]
Triangle begins as:
1;
1, 2;
1, 2, 3;
1, 3, 4, 5;
1, 3, 6, 7, 8;
1, 4, 7, 11, 12, 13;
1, 4, 10, 14, 19, 20, 21;
1, 5, 11, 21, 26, 32, 33, 34;
1, 5, 15, 25, 40, 46, 53, 54, 55;
1, 6, 16, 36, 51, 72, 79, 87, 88, 89;
Right-hand columns 1-14 are
A000045,
A000071,
A001911,
A001924,
A001891,
A014162,
A053808,
A014166,
A053809,
A053739,
A054469,
A053295,
A054470,
A053296.
Essentially a reflected version of
A055801.
-
function T(n,k) // T = A011794(n,k)
if k eq 1 or n eq 1 then return 1;
elif n eq 2 then return Min(2, k);
else return T(n-1,k-1) + T(n-2,k);
end if;
end function;
[T(n,k): k in [1..n], n in [1..15]]; // G. C. Greubel, Oct 21 2024
-
T[n_, k_]:= T[n, k]= T[n-1, k-1] + T[n-2, k]; T[n_, 1] = 1; T[1, k_] = 1; T[2, k_] := Min[2, k]; Table[T[n, k], {n,15}, {k,n}]//Flatten (* Jean-François Alcover, Feb 26 2013 *)
-
T(n,k)=if(n<=0 || k<=0,0, if(n<=2 || k==1, min(n,k), T(n-1,k-1)+T(n-2,k)))
-
def T(n, k): # T = A011794
if (k==1 or n==1): return 1
elif (n==2): return min(2,k)
else: return T(n-1, k-1) + T(n-2, k)
flatten([[T(n, k) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Oct 21 2024
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
-
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
-
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);
-
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 *)
A175660
Eight bishops and one elephant on a 3 X 3 chessboard. a(n) = 2^(n+2) - 3*F(n+2).
Original entry on oeis.org
1, 2, 7, 17, 40, 89, 193, 410, 859, 1781, 3664, 7493, 15253, 30938, 62575, 126281, 254392, 511745, 1028281, 2064314, 4141171, 8302637, 16638112, 33329357, 66744685, 133628474, 267482023, 535328225, 1071245704, 2143444841
Offset: 0
-
nmax:=29; m:=1; 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);
-
Table[2^(n+2)-3Fibonacci[n+2],{n,0,30}] (* or *) LinearRecurrence[ {3,-1,-2},{1,2,7},30] (* Harvey P. Dale, Dec 28 2012 *)
A131239
Triangle, T(n,k) = 3*A007318(n,k) - 2*A046854(n,k), read by rows.
Original entry on oeis.org
1, 1, 1, 1, 4, 1, 1, 5, 7, 1, 1, 8, 12, 10, 1, 1, 9, 24, 22, 13, 1, 1, 12, 33, 52, 35, 16, 1, 1, 13, 51, 85, 95, 51, 19, 1, 1, 16, 64, 148, 180, 156, 70, 22, 1, 1, 17, 88, 212, 348, 336, 238, 92, 25, 1, 1, 20, 105, 320, 560, 714, 574, 344, 117, 28, 1, 1, 21, 135, 425, 920, 1274, 1330, 918, 477, 145, 31, 1
Offset: 0
First few rows of the triangle:
1;
1, 1;
1, 4, 1;
1, 5, 7, 1;
1, 8, 12, 10, 1;
1, 9, 24, 22, 13, 1;
1, 12, 33, 52, 35, 16, 1;
...
-
B:=Binomial;; Flat(List([0..12], n-> List([0..n], k-> 3*B(n,k) - 2*B(Int((n+k)/2), k) ))); # G. C. Greubel, Jul 12 2019
-
B:=Binomial; [3*B(n,k) - 2*B(Floor((n+k)/2), k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 12 2019
-
With[{B=Binomial}, Table[3*B[n,k] - 2*B[Floor[(n+k)/2], k], {n,0,12}, {k,0,n}]]//Flatten (* G. C. Greubel, Jul 12 2019 *)
-
b=binomial; T(n,k) = 3*b(n,k) - 2*b((n+k)\2, k);
for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Jul 12 2019
-
b=binomial; [[3*b(n,k) - 2*b(floor((n+k)/2), k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jul 12 2019
Original entry on oeis.org
1, 1, 1, 1, 4, 1, 1, 6, 6, 1, 1, 9, 12, 9, 1, 1, 11, 23, 23, 11, 1, 1, 14, 34, 52, 34, 14, 1, 1, 16, 51, 90, 90, 51, 16, 1, 1, 19, 67, 152, 180, 152, 67, 19, 1, 1, 21, 90, 225, 342, 342, 225, 90, 21, 1
Offset: 0
First few rows of the triangle are:
1;
1, 1;
1, 4, 1;
1, 6, 6, 1;
1, 9, 12, 9, 1;
1, 11, 23, 23, 11, 1;
1, 14, 34, 52, 34, 14, 1;
1, 16, 51, 90, 90, 51, 16, 1;
...
Showing 1-7 of 7 results.
Comments