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.

A208902 The sum over all bitstrings b of length n of the number of runs in b not immediately followed by a longer run.

This page as a plain text file.
%I A208902 #22 Jul 09 2018 23:21:16
%S A208902 2,6,14,34,78,182,414,942,2110,4702,10366,22718,49406,106878,229886,
%T A208902 492286,1049598,2229758,4720638,9964542,20975614,44046334,92282878,
%U A208902 192950270,402669566,838885374,1744863230,3623927806,7516258302,15569354750,32212385790
%N A208902 The sum over all bitstrings b of length n of the number of runs in b not immediately followed by a longer run.
%C A208902 A run is a maximal subsequence of (possibly just one) identical bits.
%H A208902 Vincenzo Librandi, <a href="/A208902/b208902.txt">Table of n, a(n) for n = 1..1000</a>
%H A208902 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 A208902 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-6,-6,16,-8).
%F A208902 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)).
%F A208902 a(n) = A208903(n) + 2.
%F A208902 a(n) = 5*a(n-1) - 6*a(n-2) - 6*a(n-3) + 16*a(n-4) - 8*a(n-5), a(1) = 2, a(2) = 6, a(3) = 14, a(4) = 34, a(5) = 78.
%F A208902 G.f.: (2 - 4*x - 4*x^2 + 12*x^3 - 4*x^4)/(1 - 5*x + 6*x^2 + 6*x^3 - 16*x^4 + 8*x^5).
%e A208902 When n=3, 000,111 each have 1 such run, 101,010 each have 3, 100,011 each have 1, 001, 110 each have 2, summing these gives 2+6+2+4=14 so a(3) = 14.
%t A208902 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)), {n, 1, 40}]
%t A208902 LinearRecurrence[{5, -6, -6, 16, -8}, {2, 6, 14, 34, 78}, 40]
%Y A208902 Cf. A056453, A208900, A208901, A208903.
%K A208902 nonn,easy
%O A208902 1,1
%A A208902 _David Nacin_, Mar 03 2012