A136298
a(n) = 3*a(n-1) - 4*a(n-3), with a(0)=1, a(1)=2, a(2)=4, a(3)=9.
Original entry on oeis.org
1, 2, 4, 9, 19, 41, 87, 185, 391, 825, 1735, 3641, 7623, 15929, 33223, 69177, 143815, 298553, 618951, 1281593, 2650567, 5475897, 11301319, 23301689, 48001479, 98799161, 203190727, 417566265, 857502151, 1759743545, 3608965575
Offset: 0
-
[1] cat [(2^(n-2)*(31+3*n) - (-1)^n)/9: n in [1..40]]; // G. C. Greubel, Apr 12 2021
-
LinearRecurrence[{3,0,-4}, {1,2,4,9}, 41] (* G. C. Greubel, Apr 12 2021 *)
-
[1]+[(2^(n-2)*(31+3*n) - (-1)^n)/9 for n in (1..40)] # G. C. Greubel, Apr 12 2021
Original entry on oeis.org
1, 0, 1, 2, 4, 9, 19, 41, 88, 189, 406, 872, 1873, 4023, 8641, 18560, 39865, 85626, 183916, 395033, 848491, 1822473, 3914488, 8407925, 18059374, 38789712, 83316385, 178955183, 384377665, 825604416, 1773314929, 3808901426, 8181135700, 17572253481, 37743426307
Offset: 1
-
[n le 3 select (1-(-1)^n)/2 else Self(n-1) +2*Self(n-2) +Self(n-3): n in [1..50]]; // G. C. Greubel, Apr 14 2021
-
m:=50; S:=series( x*(1-x-x^2)/(1-x-2*x^2-x^3), x, m+1):
seq(coeff(S, x, j), j=1..m); # G. C. Greubel, Apr 14 2021
-
m:= 80; Table[SeriesCoefficient[Series[(1+t)/(1+t+t^3), {t,0,m}], n], {n,0,m,2}]
-
Vec(x*(1-x-x^2)/(1-x-2*x^2-x^3) + O(x^50)) \\ Colin Barker, Jun 29 2017
-
def A142474_list(prec):
P. = PowerSeriesRing(ZZ, prec)
return P( x*(1-x-x^2)/(1-x-2*x^2-x^3) ).list()
a=A142474_list(51); a[1:] # G. C. Greubel, Apr 14 2021
A084084
Length of lists created by n substitutions k -> Range[0,1+Mod[k+1,3]] starting with {0}.
Original entry on oeis.org
1, 3, 9, 28, 86, 265, 816, 2513, 7739, 23833, 73396, 226030, 696081, 2143648, 6601569, 20330163, 62608681, 192809420, 593775046, 1828587033, 5631308624, 17342153393, 53406819691, 164471408185, 506505428836, 1559831901918
Offset: 0
{0}, {0,1,2}, {0,1,2,0,1,2,3,0,1}, {0,1,2,0,1,2,3,0,1,0,1,2,0,1,2,3,0,1,0,1,2,0,1,2,0,1,2,3} have lengths 1, 3, 9, 28.
G.f. = 1 + 3*x + 9*x^2 + 28*x^3 + 86*x^4 + 265*x^5 + 816*x^6 + ...
-
[n le 3 select 3^(n-1) else 2*Self(n-1) +3*Self(n-2) +Self(n-3): n in [1..41]]; // G. C. Greubel, Oct 16 2022
-
Length/@Flatten/@NestList[ # /. k_Integer:>Range[0, 1+Mod[k+1, 3]]&, {0}, 8]
LinearRecurrence[{2,3,1}, {1,3,9}, 41] (* G. C. Greubel, Oct 16 2022 *)
-
def A084084_list(prec):
P. = PowerSeriesRing(ZZ, prec)
return P( (1+x)/(1-2*x-3*x^2-x^3) ).list()
A084084_list(40) # G. C. Greubel, Oct 16 2022
A104029
Triangle, read by rows, of pairwise sums of trinomial coefficients (A027907).
Original entry on oeis.org
1, 2, 1, 3, 5, 1, 4, 13, 9, 1, 5, 26, 35, 14, 1, 6, 45, 96, 75, 20, 1, 7, 71, 216, 267, 140, 27, 1, 8, 105, 427, 750, 623, 238, 35, 1, 9, 148, 770, 1800, 2123, 1288, 378, 44, 1, 10, 201, 1296, 3858, 6046, 5211, 2436, 570, 54, 1, 11, 265, 2067, 7590, 15115, 17303, 11505
Offset: 0
Row 3: {4,13,9,1} is formed from the pairwise sums
of row 3 of A027907: {1,3, 6,7, 6,3, 1}.
Rows begin:
1;
2, 1;
3, 5, 1;
4, 13, 9, 1;
5, 26, 35, 14, 1;
6, 45, 96, 75, 20, 1;
7, 71, 216, 267, 140, 27, 1;
8, 105, 427, 750, 623, 238, 35, 1;
9, 148, 770, 1800, 2123, 1288, 378, 44, 1;
10, 201, 1296, 3858, 6046, 5211, 2436, 570, 54, 1;
11, 265, 2067, 7590, 15115, 17303, 11505, 4302, 825, 65, 1;
12, 341, 3157, 13959, 34210, 49721, 43923, 23397, 7194, 1155, 77, 1; ...
-
{T(n,k)=polcoeff((1+x+x^2)^n+x*O(x^(2*k)),2*k)+ polcoeff((1+x+x^2)^n+x*O(x^(2*k+1)),2*k+1)}
for(n=0,10,for(k=0,n,print1(T(n,k),", "));print(""))
-
{T(n,k)=polcoeff(polcoeff((1-x*y)/(1-2*x*(1+y)+x^2*(1+y+y^2)) +x*O(x^n),n,x)+y*O(y^k),k,y)}
Comments