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 A384415 #9 Jun 03 2025 01:00:54 %S A384415 0,0,0,1,13,106,694,3991,21067,104680,497452,2285053,10222777, %T A384415 44788342,192970834,820244467,3448381783,14367483412,59421385000, %U A384415 244271688313,999169721125,4070288777410,16525230017710,66906367267471,270271938430243 %N A384415 a(n) = 4^n - 3^n - n*3^(n-1) - binomial(n,2)*3^(n-2). %C A384415 a(n) is the number of strings of length n defined on {0, 1, 2, 3} that contain at least three 0's. %H A384415 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (13,-63,135,-108). %F A384415 E.g.f.: exp(3*x)*(exp(x) - x^2/2 - x - 1). %F A384415 G.f.: x^3/((1 - 3*x)^3*(1 - 4*x)). - _Stefano Spezia_, May 29 2025 %e A384415 a(4) = 13 since the strings are the 4 permutations of 0001, the 4 permutations of 0002, the 4 permutations of 0003 and 0000. %t A384415 a[n_]:=4^n - 3^n - n*3^(n-1) - Binomial[n,2]*3^(n-2); Array[a,25,0] (* _Stefano Spezia_, May 29 2025 *) %Y A384415 Cf. A086443, A345954. %K A384415 nonn,easy %O A384415 0,5 %A A384415 _Enrique Navarrete_, May 28 2025