A106709
Expansion of g.f. -2*x/(1 - 5*x + 2*x^2).
Original entry on oeis.org
0, -2, -10, -46, -210, -958, -4370, -19934, -90930, -414782, -1892050, -8630686, -39369330, -179585278, -819187730, -3736768094, -17045465010, -77753788862, -354678014290, -1617882493726, -7380056440050, -33664517212798, -153562473183890, -700483331493854
Offset: 0
-
I:=[0,-2]; [n le 2 select I[n] else 5*Self(n-1) - 2*Self(n-2): n in [1..41]]; // G. C. Greubel, Sep 10 2021
-
a:= n-> (<<0|-2>, <1|5>>^n)[1,2]:
seq(a(n), n=0..25); # Alois P. Heinz, Nov 19 2020
-
LinearRecurrence[{5,-2}, {0,-2}, 41] (* G. C. Greubel, Sep 10 2021 *)
-
[-round(sqrt(2)^(n+1)*chebyshev_U(n-1, 5/(2*sqrt(2)))) for n in (0..40)] # G. C. Greubel, Sep 10 2021
A152268
Expansion of g.f. x/(1-7*x+8*x^2).
Original entry on oeis.org
0, 1, 7, 41, 231, 1289, 7175, 39913, 221991, 1234633, 6866503, 38188457, 212387175, 1181202569, 6569320583, 36535623529, 203194800039, 1130078612041, 6284991883975, 34954314291497, 194400264968679, 1081167340448777
Offset: 0
-
[lucas_number1(n,7,8) for n in range(0, 22)] # Zerinvary Lajos, Apr 23 2009
A159289
a(n+1) = 5*a(n) - 2*a(n-1).
Original entry on oeis.org
5, 21, 95, 433, 1975, 9009, 41095, 187457, 855095, 3900561, 17792615, 81161953, 370224535, 1688798769, 7703544775, 35140126337, 160293542135, 731187458001, 3335350205735, 15214376112673, 69401180151895, 316577148534129
Offset: 0
-
I:=[5, 21]; [n le 2 select I[n] else 5*Self(n-1) - 2*Self(n-2): n in [1..30]]; // G. C. Greubel, Jun 27 2018
-
LinearRecurrence[{5, -2}, {5, 21}, 50] (* G. C. Greubel, Jun 27 2018 *)
-
x='x+O('x^30); Vec(-(-5+4*x)/(1-5*x+2*x^2)) \\ G. C. Greubel, Jun 27 2018
Original entry on oeis.org
1, 2, 1, 10, 9, 2, 50, 65, 28, 4, 250, 425, 270, 76, 8, 1250, 2625, 2200, 920, 192, 16, 6250, 15625, 16250, 9000, 2800, 464, 32, 31250, 90625, 112500, 77500, 32000, 7920, 1088, 64, 156250, 515625, 743750, 612500, 315000, 103600, 21280, 2496, 128
Offset: 0
First six rows:
1;
2, 1;
10, 9, 2;
50, 65, 28, 4;
250, 425, 270, 76, 8;
1250, 2625, 2200, 920, 192; 16;
-
function T(n, k) // T = A193727
if k lt 0 or k gt n then return 0;
elif n lt 2 then return n-k+1;
else return 5*T(n-1, k) + 2*T(n-1, k-1);
end if;
end function;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Dec 02 2023
-
(* First program *)
z = 8; a = 1; b = 2; c = 1; d = 2;
p[n_, x_] := (a*x + b)^n ; q[n_, x_] := (c*x + d)^n
t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
g[n_] := CoefficientList[w[n, x], {x}]
TableForm[Table[Reverse[g[n]], {n, -1, z}]]
Flatten[Table[Reverse[g[n]], {n, -1, z}]] (* A193726 *)
TableForm[Table[g[n], {n, -1, z}]]
Flatten[Table[g[n], {n, -1, z}]] (* A193727 *)
(* Second program *)
T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[n<2, n-k+1, 5*T[n-1, k] + 2*T[n-1, k-1]]];
Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 02 2023 *)
-
def T(n, k): # T = A193727
if (k<0 or k>n): return 0
elif (n<2): return n-k+1
else: return 5*T(n-1, k) + 2*T(n-1, k-1)
flatten([[T(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Dec 02 2023
A359987
Number of edge cuts in the n-ladder graph P_2 X P_n.
Original entry on oeis.org
1, 11, 105, 919, 7713, 63351, 514321, 4148839, 33347041, 267489431, 2143168305, 17160184519, 137349160833, 1099102033911, 8794224638161, 70360221445159, 562911076526881, 4503422288363351, 36027988077717105, 288226686123491719, 2305826176955087553, 18446667292472959671
Offset: 1
-
LinearRecurrence[{13, -42, 16}, {1, 11, 105}, 25] (* Paolo Xausa, Jun 24 2024 *)
Table[2^(3 n - 2) + (((5 - Sqrt[17])/2)^n - ((5 + Sqrt[17])/2)^n)/Sqrt[17], {n, 20}] // Expand (* Eric W. Weisstein, Nov 03 2024 *)
CoefficientList[Series[-(1 - 2 x + 4 x^2)/((-1 + 8 x) (1 - 5 x + 2 x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Nov 03 2024 *)
-
Vec((1 - 2*x + 4*x^2)/((1 - 8*x)*(1 - 5*x + 2*x^2)) + O(x^25))
A109165
a(n) = 5*a(n-2) - 2*a(n-4), n >= 4.
Original entry on oeis.org
1, 2, 5, 10, 23, 46, 105, 210, 479, 958, 2185, 4370, 9967, 19934, 45465, 90930, 207391, 414782, 946025, 1892050, 4315343, 8630686, 19684665, 39369330, 89792639, 179585278, 409593865, 819187730, 1868384047, 3736768094, 8522732505
Offset: 0
A340309
Number of ordered pairs of vertices which have two different shortest paths between them in the n-Hanoi graph (3 pegs, n discs).
Original entry on oeis.org
0, 6, 48, 282, 1476, 7302, 35016, 164850, 767340, 3546366, 16315248, 74837802, 342621396, 1566620022, 7157423256, 32682574050, 149184117180, 680813718126, 3106475197248, 14173073072922, 64659388538916, 294971717255142, 1345602571317096, 6138257708432850
Offset: 1
For n=3 discs, the Hanoi graph is
* \
/ \ | top
A---* | subgraph,
/ \ | of n-1 = 2
B * | discs
/ \ / \ |
C---D---E---* /
/ \ two shortest
* * paths for
/ \ / \ A to S
*---* *---* B to T
/ \ / \ C to R
* * R * C to U
/ \ / \ / \ / \ D to S
*---*---*---*---S---T---U---*
Going from the top subgraph down to the bottom right subgraph, there are 5 vertex pairs with two shortest paths. C to R goes around the middle 12-cycle either right or left, and likewise D to S. The other pairs also go each way around the middle. There are 6 ordered pairs of n-1 subgraphs repeating these 5 pairs.
Within the n-1 = 2 disc top subgraph, A and E are in separate n-2 subgraphs (unit triangles) and they are the only pair with two shortest paths. Again 6 combinations of these, and in 3 subgraphs. Total a(3) = 6*5 + 6*3*1 = 48.
- Kevin Ryde, Table of n, a(n) for n = 1..500
- Andreas M. Hinz, Sandi Klavžar, Uroš Milutinović, Daniele Parisse, and Ciril Petr, Metric Properties of the Tower of Hanoi Graphs and Stern's Diatomic Sequence, European Journal of Combinatorics, volume 26, 2005, pages 693-708. See proposition 3.9.
- Index entries for linear recurrences with constant coefficients, signature (8,-17,6).
- Index entries for sequences related to Towers of Hanoi
A106835
Expansion of 2*x^2*(-2+9*x+3*x^2)/((2*x^2+5*x-1)*(2*x^2-5*x+1)).
Original entry on oeis.org
0, 4, 22, 114, 590, 3066, 15998, 83786, 440270, 2320314, 12260382, 64931114, 344562670, 1831630106, 9751275838, 51981730186, 277413656590, 1481919831674, 7922862005342, 42388551182314, 226923616315950, 1215450062928346
Offset: 1
-
M = {{0, 0, 0, 2}, {1, 5, 0, 0}, {0, 2, 0, 0}, {0, 0, 1, 5}};
v[1] = {0, 1, 1, 2};
v[n_] := v[n] = M.v[n - 1];
a = Table[v[n][[1]], {n, 1, 50}]
LinearRecurrence[{10,-25,0,4},{0,4,22,114},30] (* Harvey P. Dale, Jul 05 2025 *)
Edited by Associate Editors of the OEIS, Apr 05 2009
A191897
Coefficients of the Z(n,x) polynomials; Z(0,x) = 1, Z(1,x) = x and Z(n,x) = x*Z(n-1,x) - 2*Z(n-2,x), n >= 2.
Original entry on oeis.org
1, 1, 0, 1, 0, -2, 1, 0, -4, 0, 1, 0, -6, 0, 4, 1, 0, -8, 0, 12, 0, 1, 0, -10, 0, 24, 0, -8, 1, 0, -12, 0, 40, 0, -32, 0, 1, 0, -14, 0, 60, 0, -80, 0, 16, 1, 0, -16, 0, 84, 0, -160, 0, 80, 0, 1, 0, -18, 0, 112, 0, -280, 0, 240, 0, -32
Offset: 0
The first few rows of the coefficients of the Z(n,x) are
1;
1, 0;
1, 0, -2;
1, 0, -4, 0;
1, 0, -6, 0, 4;
1, 0, -8, 0, 12, 0;
1, 0, -10, 0, 24, 0, -8;
1, 0, -12, 0, 40, 0, -32, 0;
1, 0, -14, 0, 60, 0, -80, 0, 16;
1, 0, -16, 0, 84, 0, -160, 0, 80, 0;
Row sum without sign:
A113405(n+1).
-
nmax:=10: Z(0, x):=1 : Z(1, x):=x: for n from 2 to nmax do Z(n, x) := x*Z(n-1, x) - 2*Z(n-2, x) od: for n from 0 to nmax do for k from 0 to n do T(n, k) := coeff(Z(n, x), x, n-k) od: od: seq(seq(T(n, k), k=0..n), n=0..nmax); # Johannes W. Meijer, Jun 27 2011, revised Nov 29 2012
-
a[n_, k_] := If[OddQ[k], 0, 2^(k/2)*Coefficient[ ChebyshevU[n, x/2], x, n-k]]; Flatten[ Table[ a[n, k], {n, 0, 10}, {k, 0, n}]] (* Jean-François Alcover, Aug 02 2012, from 2nd formula *)
Comments