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.

A209241 3^n times the expected value of the longest run of 0's in all length n words on {0,1,2}.

This page as a plain text file.
%I A209241 #22 Jan 08 2018 09:43:32
%S A209241 0,1,6,25,92,317,1054,3425,10964,34729,109162,341125,1061132,3288713,
%T A209241 10161666,31318201,96312696,295632805,905955146,2772234385,8472129040,
%U A209241 25861509393,78861419302,240252829461,731313754312,2224352781697
%N A209241 3^n times the expected value of the longest run of 0's in all length n words on {0,1,2}.
%C A209241 a(n) is also the sum of length n words on {0,1,2} that have no runs of 0's of length >= i for i >= 1.  In other words, A000079 + A028859 + A119826 + A209239 + ...
%D A209241 R. Sedgewick and P. Flajolet, Analysis of Algorithms, Addison and Wesley, 1996, Chapter 7.
%H A209241 G. C. Greubel, <a href="/A209241/b209241.txt">Table of n, a(n) for n = 0..1000</a>
%F A209241 O.g.f.: Sum_{k=1..n} 1/(1-3x)-(1-x^k)/(1-3x+2x^(k+1)).
%F A209241 a(n) = Sum_{k=1..n} A209240(n,k)*k.
%e A209241 a(2) = 6 because for such length 2 words: 00, 01, 02, 10, 11, 12, 20, 21, 22 we have respectively longest zero runs of length 2 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 0 = 6.
%t A209241 nn=25; CoefficientList[Series[Sum[1/(1-3x)-(1-x^k)/(1-3x+2x^(k+1)), {k,1,nn}], {x,0,nn}], x]
%Y A209241 Cf. A119706.
%K A209241 nonn
%O A209241 0,3
%A A209241 _Geoffrey Critzer_, Jan 13 2013