cp's OEIS Frontend

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.

A384198 a(n) = 3^(n-3)*(binomial(n,3) + 3*binomial(n,2) + 9*n + 27).

This page as a plain text file.
%I A384198 #11 Jun 30 2025 09:05:50
%S A384198 1,4,16,64,255,1008,3942,15228,58077,218700,813564,2991816,10884699,
%T A384198 39208536,139946130,495303012,1739406393,6064804692,21006799848,
%U A384198 72318491280,247561692471,843026984064,2856838685886,9637472084364,32374793163285,108327417770268,361133233980372
%N A384198 a(n) = 3^(n-3)*(binomial(n,3) + 3*binomial(n,2) + 9*n + 27).
%C A384198 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 three times.
%H A384198 Paolo Xausa, <a href="/A384198/b384198.txt">Table of n, a(n) for n = 0..1000</a>
%H A384198 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (12,-54,108,-81).
%F A384198 E.g.f.: (1 + x + x^2/2 + x^3/6)*exp(3*x).
%F A384198 G.f.: (1 - 8*x + 22*x^2 - 20*x^3)/(1 - 3*x)^4. - _Stefano Spezia_, May 22 2025
%e A384198 a(5) = 1008 since from the 1024 words defined on {0, 1, 2, 3} we subtract the 5 permutations of 00001, the 5 permutations of 00002, the 5 permutations of 00003, and 00000.
%t A384198 LinearRecurrence[{12, -54, 108, -81}, {1, 4, 16, 64}, 30] (* or *)
%t A384198 A384198[n_] := 3^(n - 3)*(Binomial[n, 3] + 3*Binomial[n, 2] + 9*n + 27);
%t A384198 Array[A384198, 30, 0] (* _Paolo Xausa_, Jun 30 2025 *)
%Y A384198 Cf. A382618.
%K A384198 nonn,easy
%O A384198 0,2
%A A384198 _Enrique Navarrete_, May 21 2025