A382618 a(n) = 3^(n-2)*(binomial(n,2) + 3*n + 9).
1, 4, 16, 63, 243, 918, 3402, 12393, 44469, 157464, 551124, 1909251, 6554439, 22320522, 75464622, 253497357, 846585513, 2812385772, 9298091736, 30606218631, 100341906651, 327757733694, 1066956026706, 3462376910193, 11203038280413, 36150980669568, 116360969030172
Offset: 0
Examples
a(4) = 243 since from the 256 words defined on {0, 1, 2, 3} we subtract the 4 words of type 0001, the 4 words of type 0002, the 4 words of type 0003, and 0000.
Links
- Index entries for linear recurrences with constant coefficients, signature (9,-27,27).
Crossrefs
Cf. A006234.
Programs
-
Mathematica
a[n_] := 3^(n-2)*(n^2 + 5*n + 18)/2; Array[a, 27, 0] (* Amiram Eldar, Apr 01 2025 *)
Formula
E.g.f.: (1 + x + x^2/2)*exp(3*x).
G.f.: x*(1 - 5*x + 7*x^2)/(1 - 3*x)^3. - Stefano Spezia, Apr 01 2025
Comments