This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A385407 #16 Jul 03 2025 01:02:50 %S A385407 1,2,4,11,31,86,282,939,2781,7186,16496,34387,66299,119926,205766, %T A385407 337731,533817,816834,1215196,1763771,2504791,3488822,4775794,6436091, %U A385407 8551701,11217426,14542152,18650179,23682611,29798806,37177886,46020307,56549489,69013506,83686836,100872171 %N A385407 Number of strings of length n defined on {0, 1, 2, 3} that contain one or no 1's, two or no 2's, three or no 3's and any number of 0's. %H A385407 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (7,-21,35,-35,21,-7,1). %F A385407 a(n) = 60*binomial(n,6) + 10*binomial(n,5) + 4*binomial(n,4) + 4*binomial(n,3) + binomial(n,2) + n + 1. %F A385407 a(n) = 1 - (43/6)*n + 19*n^2 - (97/6)*n^3 + (77/12)*n^4 - (7/6)*n^5 + (1/12)*n^6. %F A385407 G.f.: (51*x^6 + 9*x^5 + 3*x^4 - 10*x^3 + 11*x^2 - 5*x + 1)/(1-x)^7. %F A385407 E.g.f.: exp(x)*(1+x)*(1+x^2/2)*(1+x^3/6). %e A385407 a(2) = 4 since the strings are 01, 10, 22, 00. %e A385407 a(3) = 11 since the strings are 333, 000, the 3 permutations of 122, the 3 permutations of 100, and the 3 permutations of 220. %t A385407 LinearRecurrence[{7, -21, 35, -35, 21, -7, 1}, {1, 2, 4, 11, 31, 86, 282}, 36] (* _Amiram Eldar_, Jun 28 2025 *) %o A385407 (Python) %o A385407 def A385407(n): return n*(n*(n*(n*(n*(n-14)+77)-194)+228)-86)//12+1 # _Chai Wah Wu_, Jul 02 2025 %Y A385407 Cf. A385312. %K A385407 nonn,easy %O A385407 0,2 %A A385407 _Enrique Navarrete_, Jun 27 2025