%I #15 Apr 25 2025 21:11:45
%S 1,1,4,10,37,121,406,1324,3865,9937,22816,47686,92269,167545,288562,
%T 475336,753841,1157089,1726300,2512162,3576181,4992121,6847534,
%U 9245380,12305737,16167601,20990776,26957854,34276285,43180537,53934346,66833056,82206049,100419265
%N a(n) = 90*binomial(n,6) + 18*binomial(n,4) + 3*binomial(n,2) + 1.
%C 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.
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (7,-21,35,-35,21,-7,1).
%F E.g.f.: exp(x)*(1 + x^2/2)^3.
%F a(n) = 1 - 21*n + 44*n^2 - (261/8)*n^3 + (91/8)*n^4 - (15/8)*n^5 + (1/8)*n^6.
%F 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
%e 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.
%t a[n_] := Total[{3, 18, 90} * Binomial[n, {2, 4, 6}]] + 1; Array[a, 34, 0] (* _Amiram Eldar_, Mar 15 2025 *)
%Y Cf. A382081.
%K nonn,easy
%O 0,3
%A _Enrique Navarrete_, Mar 15 2025