A384536 a(n) = 4^n - 2^(n-6)*15*binomial(n,6).
1, 4, 16, 64, 256, 1024, 4081, 16174, 63856, 252064, 998176, 3972544, 15890176, 63814144, 256903936, 1035303424, 4171964416, 16799678464, 67578904576, 271543926784, 1089985970176, 4371374669824, 17518838480896, 70170274299904, 280945723703296
Offset: 0
Examples
a(8) = 63856 since from the 65536 strings of length 8 we subtract the 420 permutations of 33332200, the 840 permutations of 33332201 and the 420 permutations of 33332211.
Links
- Index entries for linear recurrences with constant coefficients, signature (18,-140,616,-1680,2912,-3136,1920,-512).
Crossrefs
Cf. A384506.
Programs
-
Mathematica
a[n_]:=4^n-2^(n-6)*15*Binomial[n,6];Array[a,25,0] (* or *) LinearRecurrence[{18,-140,616,-1680,2912,-3136,1920,-512},{1, 4, 16, 64, 256, 1024, 4081, 16174},25] (* or *) CoefficientList[Series[ (1 - 14*x + 84*x^2 - 280*x^3 + 560*x^4 - 672*x^5 + 433*x^6 - 68*x^7)/((1 - 2*x)^7*(1 - 4*x)),{x,0,24}],x] (* James C. McMahon, Jun 08 2025 *)
Formula
G.f.: (1 - 14*x + 84*x^2 - 280*x^3 + 560*x^4 - 672*x^5 + 433*x^6 - 68*x^7)/((1 - 2*x)^7*(1 - 4*x)). - Stefano Spezia, Jun 02 2025
Comments