A362365 The sum of the coefficients of x^k in the expansion of (x + x^2 + x^3 + x^4 + x^5 + x^6)^n with k divisible by 4.
1, 9, 55, 322, 1946, 11664, 69980, 419912, 2519416, 15116544, 90699280, 544195552, 3265173536, 19591041024, 117546246080, 705277476992, 4231664861056, 25389989167104, 152339935002880, 914039610015232, 5484237660094976, 32905425960566784, 197432555763399680
Offset: 1
Examples
For n=2, (x + x^2 + x^3 + x^4 + x^5 + x^6)^2 = x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 5*x^6 + 6*x^7 + 5*x^8 + 4*x^9 + 3*x^10 + 2*x^11 + x^12. So a(2) = 3 + 5 + 1 = 9.
Links
- Paolo Xausa, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (4,10,12).
Programs
-
MATLAB
an=(6^n+(-1+1i)^n+(-1-1i)^n)/4
-
Mathematica
LinearRecurrence[{4, 10, 12}, {1, 9, 55}, 30] (* Paolo Xausa, Aug 30 2024 *)
-
PARI
a(n)=polcoef(lift(Mod(x+x^2+x^3+x^4+x^5+x^6, 1-x^4)^n), 0) \\ Andrew Howroyd, Apr 17 2023
Formula
a(n) = (1/4)*6^n + (2^(n/2-1))*cos(3*Pi*n/4).
a(n) = (1/4)*(6^n + (-1+i)^n + (-1-i)^n), where i is the imaginary unit.
a(n) = 4*a(n-1) + 10*a(n-2) + 12*a(n-3).
G.f.: x*(1 + 5*x + 9*x^2)/((1 - 6*x)*(1 + 2*x + 2*x^2)).
E.g.f.: (1/4)*exp(6*x) + cos(x)/(2*exp(x)) - 3/4.
Limit_{n->oo} a(n)/6^n = 1/4.
Comments