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 A382618 #15 Apr 13 2025 18:55:51 %S A382618 1,4,16,63,243,918,3402,12393,44469,157464,551124,1909251,6554439, %T A382618 22320522,75464622,253497357,846585513,2812385772,9298091736, %U A382618 30606218631,100341906651,327757733694,1066956026706,3462376910193,11203038280413,36150980669568,116360969030172 %N A382618 a(n) = 3^(n-2)*(binomial(n,2) + 3*n + 9). %C A382618 a(n) is the number of words of length n defined on 4 letters where a chosen letter (for example, the first letter of the alphabet) is used at most twice. %H A382618 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (9,-27,27). %F A382618 E.g.f.: (1 + x + x^2/2)*exp(3*x). %F A382618 G.f.: x*(1 - 5*x + 7*x^2)/(1 - 3*x)^3. - _Stefano Spezia_, Apr 01 2025 %e A382618 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. %t A382618 a[n_] := 3^(n-2)*(n^2 + 5*n + 18)/2; Array[a, 27, 0] (* _Amiram Eldar_, Apr 01 2025 *) %Y A382618 Cf. A006234. %K A382618 nonn,easy %O A382618 0,2 %A A382618 _Enrique Navarrete_, Apr 01 2025