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.

A385726 a(n) = 3^n - 6*binomial(n,4) - 6*binomial(n,3) - 4*binomial(n,2) - 2*n - 1.

This page as a plain text file.
%I A385726 #7 Jul 12 2025 18:46:32
%S A385726 0,0,0,2,18,102,446,1668,5676,18260,59049,177147,531441,1594323,
%T A385726 4782969,14348907,43046721,129140163,387420489,1162261467,3486784401,
%U A385726 10460353203,31381059609,94143178827,282429536481,847288609443,2541865828329,7625597484987,22876792454961,68630377364883
%N A385726 a(n) = 3^n - 6*binomial(n,4) - 6*binomial(n,3) - 4*binomial(n,2) - 2*n - 1.
%C A385726 a(n) is the number of ternary strings of length n that contain at least three 1's or at least three 2's (or both).
%H A385726 <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (3).
%F A385726 E.g.f.: exp(x)*(exp(2*x)-(1 + x + x^2/2)^2).
%F A385726 a(n) = 3^n - A385689(n).
%F A385726 G.f.: x^3*(2 + 12*x + 48*x^2 + 140*x^3 + 330*x^4 + 672*x^5 + 1232*x^6 + 4269*x^7)/(1 - 3*x). - _Stefano Spezia_, Jul 08 2025
%e A385726 a(3)= 2 since the strings are 111 and 222.
%e A385726 a(4) = 18 since the strings are (number of permutations in parentheses): 1111 (1), 1112 (4), 1110 (4), 1222 (4), 0222 (4), 2222 (1).
%Y A385726 Cf. A383343, A385689.
%K A385726 nonn,easy
%O A385726 0,4
%A A385726 _Enrique Navarrete_, Jul 08 2025