A175722
a(n) = -a(n-1) + a(n-2) - F(-n) + 1, a(0) = 1, a(1) = -1, where F() = Fibonacci numbers A000045.
Original entry on oeis.org
1, -1, 4, -6, 14, -24, 47, -83, 152, -268, 476, -832, 1453, -2517, 4348, -7474, 12810, -21880, 37275, -63335, 107376, -181656, 306744, -517056, 870169, -1462249, 2453812, -4112478, 6884102, -11510808, 19226951, -32084027, 53489288, -89097892, 148290068
Offset: 0
G.f. = 1 - x + 4*x^2 - 6*x^3 + 14*x^4 - 24*x^5 + 47*x^6 - 83*x^7 + 152*x^8 + ...
-
List([0..40], n-> 1 + (-1)^n*(n*Lucas(1,-1,n+1)[2] + 7*Fibonacci(n))/5 ); # G. C. Greubel, Dec 04 2019
-
m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-x)*(1+x-x^2)^2))); // G. C. Greubel, Aug 14 2018
-
with(combinat); seq( 1 + (-1)^n*(n*fibonacci(n+2) + (n+7)*fibonacci(n))/5, n=0..40); # G. C. Greubel, Dec 04 2019
-
f[x_, m_] = ExpandAll[(x -x^(m+1))*(1-x-x^2) -(1 -2*x +x^(m+1))];
g[x_, n_] = ExpandAll[x^(m + 3)*f[1/x, m]];
a = Table[Table[SeriesCoefficient[Series[1/g[x, m], {x, 0, 20}], n], {n, 0, 20}], {m, 1, 20}]
CoefficientList[Series[1/((1-x)(1+x-x^2)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 13 2014 *)
RecurrenceTable[{a[0]==1,a[1]==-1,a[n]==-a[n-1]+a[n-2]-Fibonacci[-n]+1},a,{n,40}] (* Harvey P. Dale, May 12 2018 *)
Table[1 + (-1)^n*(n*LucasL[n+1] + 7*Fibonacci[n])/5, {n,0,40}] (* G. C. Greubel, Dec 04 2019 *)
-
{a(n) = if( n<0, polcoeff( x^5 / ((1 - x) * (1 - x - x^2)^2) + x * O(x^-n), -n), polcoeff( 1 / ((1 - x) * (1 + x - x^2)^2) + x * O(x^n), n))}; /* Michael Somos, Mar 11 2014 */
-
vector(41, n, my(f=fibonacci); 1 -(-1)^n*((n-1)*f(n+1) +(n+6)*f(n-1))/5 ) \\ G. C. Greubel, Dec 04 2019
-
[1 + (-1)^n*(n*lucas_number2(n+1, 1,-1) + 7*fibonacci(n))/5 for n in (0..40)] # G. C. Greubel, Dec 04 2019
A283642
Decimal representation of the x-axis, from the origin to the right edge, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 678", based on the 5-celled von Neumann neighborhood.
Original entry on oeis.org
1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, 5461, 10923, 21845, 43691, 87381, 174763, 349525, 699051, 1398101, 2796203, 5592405, 11184811, 22369621, 44739243, 89478485, 178956971, 357913941, 715827883, 1431655765, 2863311531, 5726623061, 11453246123
Offset: 0
- Robert Price, Table of n, a(n) for n = 0..126
- Robert Price, Diagrams of first 20 stages
- N. J. A. Sloane, On the Number of ON Cells in Cellular Automata, arXiv:1503.01168 [math.CO], 2015
- Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
- Stephen Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.
- Wolfram Research, Wolfram Atlas of Simple Programs
- Index entries for sequences related to cellular automata
- Index to 2D 5-Neighbor Cellular Automata
- Index to Elementary Cellular Automata
- Index entries for linear recurrences with constant coefficients, signature (1,2).
-
CAStep[rule_, a_] := Map[rule[[10 - #]] &, ListConvolve[{{0, 2, 0},{2, 1, 2}, {0, 2, 0}}, a, 2],{2}];
code = 678; stages = 128;
rule = IntegerDigits[code, 2, 10];
g = 2 * stages + 1; (* Maximum size of grid *)
a = PadLeft[{{1}}, {g, g}, 0,Floor[{g, g}/2]]; (* Initial ON cell on grid *)
ca = a;
ca = Table[ca = CAStep[rule, ca], {n, 1, stages + 1}];
PrependTo[ca, a];
(* Trim full grid to reflect growth by one cell at each stage *)
k = (Length[ca[[1]]] + 1)/2;
ca = Table[Table[Part[ca[[n]] [[j]],Range[k + 1 - n, k - 1 + n]], {j, k + 1 - n, k - 1 + n}], {n, 1, k}];
Table[FromDigits[Part[ca[[i]] [[i]], Range[i, 2 * i - 1]], 2], {i ,1, stages - 1}]
-
print([(4*2**n + 1)//3 for n in range(50)]) # Karl V. Keller, Jr., Sep 03 2021
A305098
Triangle read by rows: T(0,0) = 1; T(n,k) = -T(n-1,k) + 2 T(n-2,k-1) for k = 0..floor(n/2); T(n,k)=0 for n or k < 0.
Original entry on oeis.org
1, -1, 1, 2, -1, -4, 1, 6, 4, -1, -8, -12, 1, 10, 24, 8, -1, -12, -40, -32, 1, 14, 60, 80, 16, -1, -16, -84, -160, -80, 1, 18, 112, 280, 240, 32, -1, -20, -144, -448, -560, -192, 1, 22, 180, 672, 1120, 672, 64, -1, -24, -220, -960, -2016, -1792, -448
Offset: 0
Triangle begins:
1;
-1;
1, 2;
-1, -4;
1, 6, 4;
-1, -8, -12;
1, 10, 24, 8;
-1, -12, -40, -32;
1, 14, 60, 80, 16;
-1, -16, -84, -160, -80;
1, 18, 112, 280, 240, 32;
-1, -20, -144, -448, -560, -192;
1, 22, 180, 672, 1120, 672, 64;
-1, -24, -220, -960, -2016, -1792, -448;
1, 26, 264, 1320, 3360, 4032, 1792, 128;
-1, -28, -312, -1760, -5280, -8064, -5376, -1024;
1, 30, 364, 2288, 7920, 14784, 13440, 4608, 256;
-1, -32, -420, -2912, -11440, -25344, -29568, -15360, -2304;
- Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 389-391.
-
t[0, 0] = 1; t[n_, k_] := If[n < 0 || k < 0, 0, -t[n - 1, k] + 2 t[n - 2, k - 1]]; Table[t[n, k], {n, 0, 13}, {k, 0, Floor[n/2]}] // Flatten
-
T(n, k) = if ((n<0) || (k<0), 0, if ((n==0) && (k==0), 1, -T(n-1, k) + 2*T(n-2, k-1)));
tabf(nn) = for (n=0, nn, for (k=0, n\2, print1(T(n,k), ", ")); print); \\ Michel Marcus, May 26 2018
A345034
a(n) = Sum_{k=1..n} (-2)^(floor(n/k) - 1).
Original entry on oeis.org
1, -1, 6, -8, 17, -27, 70, -136, 255, -491, 1046, -2082, 4063, -8131, 16476, -32882, 65423, -130845, 262372, -524818, 1048149, -2096045, 4195412, -8390820, 16775029, -33550477, 67113210, -134225588, 268427597, -536854983, 1073757754, -2147517076
Offset: 1
-
a[n_] := Sum[(-2)^(Floor[n/k] - 1), {k, 1, n}]; Array[a, 30] (* Amiram Eldar, Jun 06 2021 *)
-
a(n) = sum(k=1, n, (-2)^(n\k-1));
-
my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, x^k*(1-x^k)/(1+2*x^k))/(1-x))
A209998
Triangle of coefficients of polynomials v(n,x) jointly generated with A209996; see the Formula section.
Original entry on oeis.org
1, 2, 3, 2, 8, 9, 2, 10, 30, 27, 2, 10, 46, 108, 81, 2, 10, 50, 198, 378, 243, 2, 10, 50, 242, 810, 1296, 729, 2, 10, 50, 250, 1122, 3186, 4374, 2187, 2, 10, 50, 250, 1234, 4986, 12150, 14580, 6561, 2, 10, 50, 250, 1250, 5946, 21330, 45198, 48114, 19683
Offset: 1
First five rows:
1
2...3
2...8....9
2...10...30...27
2...10...46...108...81
First three polynomials v(n,x): 1, 2 + 3x , 2 + 8x + 9x^2.
-
u[1, x_] := 1; v[1, x_] := 1; z = 16;
u[n_, x_] := x*u[n - 1, x] + 2 x*v[n - 1, x] + 1;
v[n_, x_] := (x + 1)*u[n - 1, x] + 2 x*v[n - 1, x] + 1;
Table[Expand[u[n, x]], {n, 1, z/2}]
Table[Expand[v[n, x]], {n, 1, z/2}]
cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
TableForm[cu]
Flatten[%] (* A209996 *)
Table[Expand[v[n, x]], {n, 1, z}]
cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
TableForm[cv]
Flatten[%] (* A209998 *)
A210747
Triangle of coefficients of polynomials u(n,x) jointly generated with A210748; see the Formula section.
Original entry on oeis.org
1, 2, 3, 4, 9, 8, 7, 24, 33, 21, 12, 54, 109, 111, 55, 20, 114, 297, 435, 355, 144, 33, 228, 736, 1383, 1606, 1098, 377, 54, 441, 1697, 3912, 5813, 5625, 3316, 987, 88, 831, 3723, 10158, 18419, 22779, 18962, 9837, 2584, 143, 1536, 7859, 24798
Offset: 1
First five rows:
1
2....3
4....9....8
7....24...33....21
12...54...109...111...55
First three polynomials u(n,x): 1, 2+ 3x, 4 + 9x + 8x^2.
-
u[1, x_] := 1; v[1, x_] := 1; z = 16;
u[n_, x_] := 2 x*u[n - 1, x] + (x + 1)*v[n - 1, x] + 1;
v[n_, x_] := (x + 1)*u[n - 1, x] + (x + 1)*v[n - 1, x] + 1;
Table[Expand[u[n, x]], {n, 1, z/2}]
Table[Expand[v[n, x]], {n, 1, z/2}]
cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
TableForm[cu]
Flatten[%] (* A210747 *)
Table[Expand[v[n, x]], {n, 1, z}]
cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
TableForm[cv]
Flatten[%] (* A210748 *)
Table[u[n, x] /. x -> 1, {n, 1, z}] (* A002450 *)
Table[v[n, x] /. x -> 1, {n, 1, z}] (* A002450 *)
Table[u[n, x] /. x -> -1, {n, 1, z}] (* A077925 *)
Table[v[n, x] /. x -> -1, {n, 1, z}] (* A000012 *)
A210748
Triangle of coefficients of polynomials v(n,x) jointly generated with A210747; see the Formula section.
Original entry on oeis.org
1, 3, 2, 6, 10, 5, 11, 29, 32, 13, 19, 71, 118, 99, 34, 32, 156, 352, 437, 299, 89, 53, 322, 919, 1521, 1526, 887, 233, 87, 636, 2205, 4559, 6036, 5117, 2595, 610, 142, 1218, 4979, 12373, 20320, 22591, 16653, 7508, 1597, 231, 2279, 10751, 31233
Offset: 1
First five rows:
1
3....2
6....10...5
11...29...32....13
19...71...118...99...34
First three polynomials v(n,x): 1, 3 + 2x, 6 + 10x +5x^2
-
u[1, x_] := 1; v[1, x_] := 1; z = 16;
u[n_, x_] := 2 x*u[n - 1, x] + (x + 1)*v[n - 1, x] + 1;
v[n_, x_] := (x + 1)*u[n - 1, x] + (x + 1)*v[n - 1, x] + 1;
Table[Expand[u[n, x]], {n, 1, z/2}]
Table[Expand[v[n, x]], {n, 1, z/2}]
cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
TableForm[cu]
Flatten[%] (* A210747 *)
Table[Expand[v[n, x]], {n, 1, z}]
cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
TableForm[cv]
Flatten[%] (* A210748 *)
Table[u[n, x] /. x -> 1, {n, 1, z}] (* A002450 *)
Table[v[n, x] /. x -> 1, {n, 1, z}] (* A002450 *)
Table[u[n, x] /. x -> -1, {n, 1, z}] (* A077925 *)
Table[v[n, x] /. x -> -1, {n, 1, z}] (* A000012 *)
A210793
Triangle of coefficients of polynomials u(n,x) jointly generated with A210794; see the Formula section.
Original entry on oeis.org
1, 2, 1, 3, 4, 2, 6, 10, 8, 3, 9, 24, 27, 16, 5, 18, 51, 74, 62, 30, 8, 27, 108, 189, 200, 136, 56, 13, 54, 216, 450, 574, 488, 282, 102, 21, 81, 432, 1026, 1536, 1571, 1128, 569, 184, 34, 162, 837, 2268, 3864, 4598, 3967, 2486, 1118, 328, 55, 243, 1620
Offset: 1
First five rows:
1;
2, 1;
3, 4, 2;
6, 10, 8, 3;
9, 24, 27, 16, 5;
First three polynomials u(n,x):
1
2 + x
3 + 4x + 2x^2.
From _Philippe Deléham_, Mar 29 2012: (Start)
(1, 1, -1, -1, 0, 0, 0, ...) DELTA (0, 1, 1, -1, 0, 0, 0, ...) begins:
1;
1, 0;
2, 1, 0;
3, 4, 2, 0;
6, 10, 8, 3, 0;
9, 24, 27, 16, 5, 0;
18, 51, 74, 62, 30, 8, 0; (End)
-
u[1, x_] := 1; v[1, x_] := 1; z = 16;
u[n_, x_] := u[n - 1, x] + (x + j)*v[n - 1, x] + c;
d[x_] := h + x; e[x_] := p + x;
v[n_, x_] := d[x]*u[n - 1, x] + e[x]*v[n - 1, x] + f;
j = 1; c = 0; h = 2; p = -1; f = 0;
Table[Expand[u[n, x]], {n, 1, z/2}]
Table[Expand[v[n, x]], {n, 1, z/2}]
cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
TableForm[cu]
Flatten[%] (* A210793 *)
cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
TableForm[cv]
Flatten[%] (* A210794 *)
Table[u[n, x] /. x -> 1, {n, 1, z}] (* A000244 *)
Table[v[n, x] /. x -> 1, {n, 1, z}] (* A000244 *)
Table[u[n, x] /. x -> -1, {n, 1, z}] (* A000012 *)
Table[v[n, x] /. x -> -1, {n, 1, z}] (* A077925 *)
A210794
Triangle of coefficients of polynomials v(n,x) jointly generated with A210793; see the Formula section.
Original entry on oeis.org
1, 1, 2, 3, 3, 3, 3, 11, 8, 5, 9, 18, 29, 17, 8, 9, 48, 67, 71, 35, 13, 27, 81, 180, 194, 158, 68, 21, 27, 189, 387, 575, 508, 338, 129, 34, 81, 324, 918, 1410, 1617, 1222, 695, 239, 55, 81, 702, 1890, 3606, 4471, 4222, 2793, 1393, 436, 89, 243, 1215
Offset: 1
First five rows:
1
1...2
3...3....3
3...11...8....5
9...18...29...17...8
First three polynomials v(n,x): 1, 1 + 2x, 3 + 3x + 3x^2
-
u[1, x_] := 1; v[1, x_] := 1; z = 16;
u[n_, x_] := u[n - 1, x] + (x + j)*v[n - 1, x] + c;
d[x_] := h + x; e[x_] := p + x;
v[n_, x_] := d[x]*u[n - 1, x] + e[x]*v[n - 1, x] + f;
j = 1; c = 0; h = 2; p = -1; f = 0;
Table[Expand[u[n, x]], {n, 1, z/2}]
Table[Expand[v[n, x]], {n, 1, z/2}]
cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
TableForm[cu]
Flatten[%] (* A210793 *)
cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
TableForm[cv]
Flatten[%] (* A210794 *)
Table[u[n, x] /. x -> 1, {n, 1, z}] (* A000244 *)
Table[v[n, x] /. x -> 1, {n, 1, z}] (* A000244 *)
Table[u[n, x] /. x -> -1, {n, 1, z}] (* A000012 *)
Table[v[n, x] /. x -> -1, {n, 1, z}] (* A077925 *)
A210870
Triangle of coefficients of polynomials u(n,x) jointly generated with A210871; see the Formula section.
Original entry on oeis.org
1, 1, 1, 1, 2, 2, 1, 3, 3, 3, 1, 4, 6, 5, 5, 1, 5, 8, 12, 8, 8, 1, 6, 12, 17, 23, 13, 13, 1, 7, 15, 29, 33, 43, 21, 21, 1, 8, 20, 38, 64, 63, 79, 34, 34, 1, 9, 24, 56, 86, 136, 117, 143, 55, 55, 1, 10, 30, 70, 140, 187, 279, 214, 256, 89, 89, 1, 11, 35, 95, 180, 332
Offset: 1
First six rows:
1
1...1
1...2...2
1...3...3...3
1...4...6...5....5
1...5...8...12...8...8
First three polynomials u(n,x): 1, 1 + x, 1 + 2x + 2x^2.
-
u[1, x_] := 1; v[1, x_] := 1; z = 14;
u[n_, x_] := u[n - 1, x] + x*v[n - 1, x];
v[n_, x_] := (x + 1)*u[n - 1, x] + (x - 1)*v[n - 1, x] + 1;
Table[Expand[u[n, x]], {n, 1, z/2}]
Table[Expand[v[n, x]], {n, 1, z/2}]
cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
TableForm[cu]
Flatten[%] (* A210870 *)
cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
TableForm[cv]
Flatten[%] (* A210871 *)
Table[u[n, x] /. x -> 1, {n, 1, z}] (* A000975 *)
Table[v[n, x] /. x -> 1, {n, 1, z}] (* A001045 *)
Table[u[n, x] /. x -> -1, {n, 1, z}] (* A113954 *)
Table[v[n, x] /. x -> -1, {n, 1, z}] (* A077925 *)
Comments