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.
%I A000253 #47 Aug 12 2022 20:01:55 %S A000253 0,1,4,11,27,63,142,312,673,1432,3015,6295,13055,26926,55284,113081, %T A000253 230572,468883,951347,1926527,3894878,7863152,15855105,31936240, %U A000253 64269135,129234351,259690239,521524126,1046810092,2100221753,4212028452,8444387067 %N A000253 a(n) = 2*a(n-1) - a(n-2) + a(n-3) + 2^(n-1). %C A000253 From Holger Petersen (petersen(AT)informatik.uni-stuttgart.de), May 29 2006: (Start) %C A000253 Also number of binary strings of length n+2 containing the pattern 010. Proof: Clear for n = 0, 1, 2. For n > 2 each string with pattern 010 of length n-1 gives 2 strings of length n with the property by appending a symbol. In addition each string of length n-1 without 010 and ending in 01 contributes one new string. Denote by c_w(m) the number of strings of length m without 010 and ending in w. %C A000253 Since there is a total of 2^m strings of length m, we have c_01(m) = c_0(m-1) = (2^{m-1} - a(m-3)) - c_1(m-1) = (2^{m-1} - a(m-3)) - (2^{m-2} - a(m-4)) = 2^{m-2} - a(m-3) + a(m-4) (the first and third equalities follow from the fact that appending a 1 will not generate the pattern). The recurrence is a(n) = 2a(n-1) + c_01(n+1) = 2a(n-1) + 2^{n-1} - a(n-2) + a(n-3). %C A000253 (End) %H A000253 Alois P. Heinz, <a href="/A000253/b000253.txt">Table of n, a(n) for n = 0..1000</a> %H A000253 Mathematics Stack Exchange, <a href="http://math.stackexchange.com/questions/86495">Recurrence relations - binary substrings</a> %H A000253 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-5,3,-2). %F A000253 From _Ralf Stephan_, Aug 19 2004: (Start) %F A000253 a(n) = (1/3)*(4*2^n + A077941(n-1) - 2*A077941(n+1)). %F A000253 G.f.: x/((1-2*x)*(1 - 2*x + x^2 - x^3)). (End) %F A000253 a(n) = A000079(n+2) - A005251(n+5). - _Alois P. Heinz_, Apr 03 2012 %p A000253 f := proc(n) option remember; if n<=1 then n else if n<=3 then 7*n-10; else 2*f(n-1)-f(n-2)+f(n-3)+2^(n-1); fi; fi; end; %p A000253 # second Maple program: %p A000253 a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <-2|3|-5|4>>^n)[3, 4]: %p A000253 seq(a(n), n=0..30); # _Alois P. Heinz_, Mar 27 2017 %t A000253 nn=50; a=x^2/(1-x)^2; Drop[CoefficientList[Series[a x/(1-a x)/(1-2x), {x,0,nn}], x], 2] (* _Geoffrey Critzer_, Nov 26 2013 *) %t A000253 LinearRecurrence[{4, -5, 3, -2}, {0, 1, 4, 11}, 32] (* _Jean-François Alcover_, Feb 06 2016 *) %K A000253 nonn %O A000253 0,3 %A A000253 Jason Howald (jahowald(AT)umich.edu)