login
A382084
a(n) = 90*binomial(n,6) + 18*binomial(n,4) + 3*binomial(n,2) + 1.
1
1, 1, 4, 10, 37, 121, 406, 1324, 3865, 9937, 22816, 47686, 92269, 167545, 288562, 475336, 753841, 1157089, 1726300, 2512162, 3576181, 4992121, 6847534, 9245380, 12305737, 16167601, 20990776, 26957854, 34276285, 43180537, 53934346, 66833056, 82206049, 100419265
OFFSET
0,3
COMMENTS
a(n) is the number of strings of length n defined on {0, 1, 2, 3} that contain zero or two 0's, zero or two 1's, zero or two 2's, and there are no restrictions on the number of 3's.
FORMULA
E.g.f.: exp(x)*(1 + x^2/2)^3.
a(n) = 1 - 21*n + 44*n^2 - (261/8)*n^3 + (91/8)*n^4 - (15/8)*n^5 + (1/8)*n^6.
G.f.: (1 - 6*x + 18*x^2 - 32*x^3 + 51*x^4 - 54*x^5 + 112*x^6)/(1 - x)^7. - Stefano Spezia, Mar 15 2025
EXAMPLE
For example, a(4) = 37 since the strings are 3333 and the 6 permutations of each of the following strings: 0011, 0022, 1122, 0033, 1133, 2233.
MATHEMATICA
a[n_] := Total[{3, 18, 90} * Binomial[n, {2, 4, 6}]] + 1; Array[a, 34, 0] (* Amiram Eldar, Mar 15 2025 *)
CROSSREFS
Cf. A382081.
Sequence in context: A079725 A154152 A357051 * A370781 A025237 A149188
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Mar 15 2025
STATUS
approved