A382683
Expansion of (1-x^2) / (1-x-3*x^2+x^3).
Original entry on oeis.org
1, 1, 3, 5, 13, 25, 59, 121, 273, 577, 1275, 2733, 5981, 12905, 28115, 60849, 132289, 286721, 622739, 1350613, 2932109, 6361209, 13806923, 29958441, 65018001, 141086401, 306181963, 664423165, 1441882653, 3128970185, 6790194979, 14735222881, 31976837633
Offset: 0
Consider walks starting at 0 in the following graph:
2
/|
0-1 |
\|
3
The 5 walks of length 3 are 0-1-0-1, 0-1-2-1, 0-1-2-3, 0-1-3-1, and 0-1-3-2.
-
a:= n-> (<<0|1|0>, <0|0|1>, <-1|3|1>>^n. <<1,1,3>>)[1,1]:
seq(a(n), n=0..32); # Alois P. Heinz, Jun 04 2025
-
LinearRecurrence[{1,3,-1},{1,1,3},33] (* or *) CoefficientList[Series[ (1-x^2) / (1-x-3*x^2+x^3),{x,0,32}],x] (* James C. McMahon, Jun 02 2025 *)
A087956
a(n) is the square of the n-th partial sum minus the n-th partial sum of the squares, divided by a(n-1), for all n>=1, starting with a(0)=1, a(1)=3.
Original entry on oeis.org
1, 3, 2, 11, 14, 45, 76, 197, 380, 895, 1838, 4143, 8762, 19353, 41496, 90793, 195928, 426811, 923802, 2008307, 4352902, 9454021, 20504420, 44513581, 96572820, 209609143, 454814022, 987068631, 2141901554, 4648293425, 10086929456
Offset: 0
a(4) = 14 since ((1+3+2+11)^2 - (1^2+3^2+2^2+11^2))/11 = (17^2-135)/11 = 14.
-
a(0)=1; a(1)=3; for(n=2,50,a(n)=((sum(k=0,n,a(k))^2-sum(k=0,n,a(k)^2))/a(n-1))
A087957
a(n) is the square of the n-th partial sum minus the n-th partial sum of the squares, divided by a(n-1), for all n>=1, starting with a(0)=1, a(1)=4.
Original entry on oeis.org
1, 4, 2, 14, 16, 56, 90, 242, 456, 1092, 2218, 5038, 10600, 23496, 50258, 110146, 237424, 517604, 1119730, 2435118, 5276704, 11462328, 24857322, 53967602, 117077240, 254122724, 551386842, 1196677774, 2596715576, 5635362056
Offset: 0
a(4) = 16 since ((1+4+2+14)^2 - (1^2+4^2+2^2+14^2))/14 = (21^2-217)/14 = 16.
-
a(0)=1; a(1)=4; for(n=2,50,a(n)=((sum(k=0,n,a(k))^2-sum(k=0,n,a(k)^2))/a(n-1))
A087958
a(n) is the square of the n-th partial sum minus the n-th partial sum of the squares, divided by a(n-1), for all n>=1, starting with a(0)=1, a(1)=5.
Original entry on oeis.org
1, 5, 2, 17, 18, 67, 104, 287, 532, 1289, 2598, 5933, 12438, 27639, 59020, 129499, 278920, 608397, 1315658, 2861929, 6200506, 13470635, 29210224, 63421623, 137581660, 298636305, 647959662, 1406286917, 3051529598, 6622430687
Offset: 0
a(4) = 18 since ((1+5+2+17)^2 - (1^2+5^2+2^2+17^2))/17 = (25^2-319)/17 = 18.
-
Join[{1},LinearRecurrence[{1,3,-1},{5,2,17},30]] (* Harvey P. Dale, Jul 07 2011 *)
-
a(0)=1; a(1)=5; for(n=2,50,a(n)=((sum(k=0,n,a(k))^2-sum(k=0,n,a(k)^2))/a(n-1))
A088016
To obtain a(n+1), add the square of the n-th partial sum to the n-th partial sum of the squares, then divide this result by a(n), for all n >= 0, with a(0)=1.
Original entry on oeis.org
1, 1, 6, 17, 56, 179, 576, 1851, 5950, 19125, 61474, 197597, 635140, 2041543, 6562172, 21092919, 67799386, 217928905, 700493182, 2251609065, 7237391472, 23263290299, 74775653304, 240352858739, 772570939222, 2483290023101
Offset: 0
G.f.: A(x) = 1 + x + 6*x^2 + 17*x^3 + 56*x^4 + 179*x^5 + 576*x^6 + ...
where A(x) * (1 - 3*x - x^2 + x^3) = 1 - 2*x + 2*x^2 - x^3.
Illustration of the initial terms: set a(0) = a(1) = 1, then
a(2) = ((1+1)^2 + (1^2 + 1^2))/1 = 6;
a(3) = ((1+1+6)^2 + (1^2 + 1^2 + 6^2))/6 = 17;
a(4) = ((1+1+6+17)^2 + (1^2 + 1^2 + 6^2 + 17^2))/17 = 56;
a(5) = ((1+1+6+17+56)^2 + (1^2 + 1^2 + 6^2 + 17^2 + 56^2))/56 = 179; ...
-
a:=[1,6,17];; for n in [4..40] do a[n]:=3*a[n-1]+a[n-2]-a[n-3]; od; Concatenation([1], a); # G. C. Greubel, Oct 27 2019
-
I:=[1,6,17]; [1] cat [n le 3 select I[n] else 3*Self(n-1) +Self(n-2) -Self(n-3): n in [1..30]]; // G. C. Greubel, Oct 27 2019
-
seq(coeff(series((1-2*x+2*x^2-x^3)/(1-3*x-x^2+x^3), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Oct 27 2019
-
LinearRecurrence[{3,1,-1},{1,1,6,17},40] (* Harvey P. Dale, Nov 06 2012 *)
-
a(n)=(sum(k=0,n-1,a(k))^2+sum(k=0,n-1,a(k)^2))/a(n-1)
-
my(x='x+O('x^40)); Vec((1-2*x+2*x^2-x^3)/(1-3*x-x^2+x^3)) \\ G. C. Greubel, Oct 27 2019
-
def A088016_list(prec):
P. = PowerSeriesRing(ZZ, prec)
return P((1-2*x+2*x^2-x^3)/(1-3*x-x^2+x^3)).list()
A088016_list(40) # G. C. Greubel, Oct 27 2019
Showing 1-5 of 5 results.
Comments