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.

A208903 The sum over all bitstrings b of length n with at least two runs of the number of runs in b not immediately followed by a longer run.

This page as a plain text file.
%I A208903 #22 Jul 09 2018 23:21:30
%S A208903 0,4,12,32,76,180,412,940,2108,4700,10364,22716,49404,106876,229884,
%T A208903 492284,1049596,2229756,4720636,9964540,20975612,44046332,92282876,
%U A208903 192950268,402669564,838885372,1744863228,3623927804,7516258300,15569354748,32212385788
%N A208903 The sum over all bitstrings b of length n with at least two runs of the number of runs in b not immediately followed by a longer run.
%C A208903 A run is a maximal subsequence of (possibly just one) identical bits.
%H A208903 Vincenzo Librandi, <a href="/A208903/b208903.txt">Table of n, a(n) for n = 1..1000</a>
%H A208903 Aruna Gabhe, <a href="https://www.jstor.org/stable/10.4169/amer.math.monthly.119.02.161">Problem 11623</a>, Am. Math. Monthly 119 (2012) 161.
%H A208903 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-6,-6,16,-8).
%F A208903 a(n) = 2^n * (2 + (n - 1)/2 - (1/2)^(n - 1) - 2 (1 - (1/2)^floor(n/2)) + (1/2)^(floor(n/2) + 1) (1 + (-1)^n)) - 2.
%F A208903 a(n) = A208902(n) - 2.
%F A208903 a(n) = 5*a(n-1) - 6*a(n-2) - 6*a(n-3) + 16*a(n-4) - 8*a(n-5), a(1) = 0, a(2) = 4, a(3) = 12, a(4) = 32, a(5) = 76.
%F A208903 G.f.: (4*x - 8*x^2 - 4*x^3 + 12*x^4)/(1 - 5*x + 6*x^2 + 6*x^3 - 16*x^4 +
%F A208903    8*x^5).
%e A208903 n=3: 101, 010 each have 3; 100, 011 each have 1; 001, 110 each have 2. (000, 111 do not have at least two runs so they do not contribute.) Summing these gives 6+2+4 = 12 so a(3) = 12.
%t A208903 Table[2^n*(2 + (n-1)/2 - (1/2)^(n-1) - 2*(1 - (1/2)^Floor[n/2]) + (1/2)^(Floor[n/2] + 1) (1 + (-1)^n)) - 2, {n, 1, 40}]
%t A208903 LinearRecurrence[{5, -6, -6, 16, -8}, {0, 4, 12, 32, 76}, 40]
%Y A208903 Cf. A056453, A208900, A208901, A208902.
%K A208903 nonn,easy
%O A208903 1,2
%A A208903 _David Nacin_, Mar 03 2012