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 A187180 #48 Sep 03 2025 10:21:52 %S A187180 1,1,2,3,2,3,4,5,4,5,6,7,6,7,8,9,8,9,10,11,10,11,12,13,12,13,14,15,14, %T A187180 15,16,17,16,17,18,19,18,19,20,21,20,21,22,23,22,23,24,25,24,25,26,27, %U A187180 26,27,28,29,28,29,30,31,30,31,32,33,32,33,34,35,34,35,36,37,36,37,38,39,38,39,40,41,40,41,42,43,42,43,44,45,44,45,46,47,46,47,48,49,48,49,50,51,50,51,52,53,52,53,54,55,54,55,56,57,56,57,58,59,58,59,60,61 %N A187180 Parse the infinite string 0101010101... into distinct phrases 0, 1, 01, 010, 10, ...; a(n) = length of n-th phrase. %H A187180 Ray Chandler, <a href="/A187180/b187180.txt">Table of n, a(n) for n = 1..1000</a> %H A187180 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1). %F A187180 Consider more generally the string 012...k012...k012...k012...k01... with an alphabet of size B, where k = B-1. The sequence begins with B 1's, and thereafter is quasi-periodic with period B^2, and increases by B in each period. %F A187180 For the present example, where B=2, the sequence begins with two 1's and thereafter increases by 2 in each block of 4: (1,1) (2,3,2,3), (4,5,4,5), (6,7,6,7), ... %F A187180 From _Colin Barker_, Oct 15 2015: (Start) %F A187180 a(n) = (1+(-1)^n+(1-i)*(-i)^n+(1+i)*i^n+2*n)/4 for n>1, where i = sqrt(-1). %F A187180 G.f.: x*(x^5-2*x^4+x^3+x^2+1) / ((x-1)^2*(x+1)*(x^2+1)). (End) %F A187180 From _Wesley Ivan Hurt_, May 03 2021: (Start) %F A187180 a(n) = a(n-1)+a(n-4)-a(n-5). %F A187180 a(n) = floor((n+1+(-1)^floor((n+1)/2))/2) for n > 1. (End) %e A187180 The sequence begins %e A187180 1 1 %e A187180 2 3 2 3 %e A187180 4 5 4 5 %e A187180 6 7 6 7 %e A187180 8 9 8 9 %e A187180 10 11 10 11 ... %p A187180 1,1,seq(op(2*i*[1,1,1,1]+[0,1,0,1]), i=1..100); # _Robert Israel_, Oct 15 2015 %t A187180 Join[{1},LinearRecurrence[{1, 0, 0, 1, -1},{1, 2, 3, 2, 3},119]] (* _Ray Chandler_, Aug 26 2015 *) %t A187180 CoefficientList[Series[(x^5 - 2 x^4 + x^3 + x^2 + 1)/((x - 1)^2 (x + 1) (x^2 + 1)), {x, 0, 150}], x] (* _Vincenzo Librandi_, Oct 16 2015 *) %o A187180 (PARI) a(n) = if(n==1, 1, (1 + (-1)^n + (1-I)*(-I)^n + (1+I)*I^n + 2*n) / 4); \\ _Colin Barker_, Oct 15 2015 %o A187180 (PARI) Vec(x*(x^5-2*x^4+x^3+x^2+1) / ((x-1)^2*(x+1)*(x^2+1)) + O(x^100)) \\ _Colin Barker_, Oct 15 2015 %Y A187180 See A187180-A187188 for alphabets of size 2 through 10. %Y A187180 See also A109337, A187199, A187200, A106249, A083219, A018837. %Y A187180 Essentially the same as A106249 and A018837. %K A187180 nonn,easy,changed %O A187180 1,3 %A A187180 _N. J. A. Sloane_, Mar 06 2011