A100216 Relates row sums of Pascal's triangle to expansion of cos(x)/exp(x).
1, 4, 9, 16, 26, 44, 84, 176, 376, 784, 1584, 3136, 6176, 12224, 24384, 48896, 98176, 196864, 393984, 787456, 1573376, 3144704, 6288384, 12578816, 25163776, 50335744, 100675584, 201342976, 402661376, 805289984, 1610563584, 3221159936
Offset: 0
Examples
a(2) = 9 because (.5 'j + .5 'k + .5 j' + .5 k' + 1 'ii' + 1 e)^3 = 1'j + 1'k + 1j' + 1k' + 3'ii' + 2'jj' + 2'kk' + 1'jk' + 1'kj' + 1e and the sum of the coefficients belonging to basis vectors which squared give the unit e (excluding e itself) is 3+2+2+1+1 = 9 (see comment).
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4).
Programs
-
Magma
[n le 3 select n^2 else 4*Self(n-1) -6*Self(n-2) +4*Self(n-3): n in [1..40]]; // G. C. Greubel, Mar 28 2024
-
Maple
a:= n-> (<<0|1|0>, <0|0|1>, <4|-6|4>>^n. <<1, 4, 9>>)[1, 1]: seq(a(n), n=0..35); # Alois P. Heinz, Nov 07 2013
-
Mathematica
d = 4; nmax = 31; a[n_ /; n < d] := (n + 1)^2; seq = Table[a[n], {n, 0, nmax}]; seq /. Solve[ Thread[ Take[seq, nmax - d + 1] == Differences[seq, d]]] // First (* Jean-François Alcover, Nov 07 2013 *) LinearRecurrence[{4,-6,4}, {1,4,9}, 41] (* G. C. Greubel, Mar 28 2024 *)
-
SageMath
@CachedFunction def a(n): # a = A100216 if n<3: return (n+1)^2 else: return 4*a(n-1) -6*a(n-2) +4*a(n-3) [a(n) for n in range(41)] # G. C. Greubel, Mar 28 2024
Formula
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3), with a(0) = 1, a(1) = 4, a(2) = 9.
G.f.: (1-x^2)/((1-2*x)*(1-2*x+2*x^2)).
(a(n)) = lesseq(.5 'j + .5 'k + .5 j' + .5 k' + 1 'ii' + 1 e).
E.g.f.: (1/2)*exp(x)*(3*sin(x) - cos(x) + 3*exp(x)). - G. C. Greubel, Mar 28 2024
Comments