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.

A387185 a(n) = n*2^(n-1) + binomial(n,2)*2^(n-2) + binomial(n,3)*2^(n-3).

This page as a plain text file.
%I A387185 #10 Aug 26 2025 05:31:32
%S A387185 0,1,5,19,64,200,592,1680,4608,12288,32000,81664,204800,505856,
%T A387185 1232896,2969600,7077888,16711680,39124992,90898432,209715200,
%U A387185 480772096,1095761920,2484076544,5603590144,12582912000,28135391232,62662901760,139049566208,307492814848,677799526400
%N A387185 a(n) = n*2^(n-1) + binomial(n,2)*2^(n-2) + binomial(n,3)*2^(n-3).
%C A387185 Number of ternary strings of length n that contain one, two or three 0's.
%C A387185 Number of words of length n defined on five letters that contain one a or 2 b's or 3 c's and any number of d's and e's.
%H A387185 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (8,-24,32,-16).
%F A387185 E.g.f.: (1 + x/2 + x^2/6)*x*exp(2*x).
%F A387185 G.f.: x*(1-3*x+3*x^2)/(2*x-1)^4 . - _R. J. Mathar_, Aug 26 2025
%F A387185 a(n) = n*2^n*(20+3*n+n^2)/48. - _R. J. Mathar_, Aug 26 2025
%e A387185 a(3) = 19 since the words are (number of permutations in parentheses): add (3), ade (6), aee (3), bbd (3), bbe (3), ccc (1).
%e A387185 a(4) = 64 since from the 81 strings of length 4 we subtract the following 17 (number of permutations in parentheses): 0000 (1), 1111 (1), 1112 (4), 1122 (6), 1222 (4), 2222 (1).
%t A387185 a[n_] := Sum[2^(n-k)*Binomial[n, k], {k, 1, 3}]; Array[a, 30, 0] (* _Amiram Eldar_, Aug 21 2025 *)
%Y A387185 Cf. A001793, A385312.
%K A387185 nonn,easy,new
%O A387185 0,3
%A A387185 _Enrique Navarrete_, Aug 21 2025