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 A121496 #13 Oct 03 2017 03:59:48 %S A121496 1,2,2,1,3,4,4,3,5,6,6,5,7,8,8,7,9,10,10,9,11,12,12,11,13,14,14,13,15, %T A121496 16,16,15,17,18,18,17,19,20,20,19,21,22,22,21,23,24,24,23,25,26,26,25, %U A121496 27,28,28,27,29,30,30,29,31,32,32,31,33,34,34,33,35,36,36,35,37,38,38 %N A121496 Run lengths of successive numbers in A068225. %C A121496 A000027 and A103889 are bisections. %H A121496 Colin Barker, <a href="/A121496/b121496.txt">Table of n, a(n) for n = 1..1000</a> %H A121496 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1). %F A121496 a(2*k-1) = k, a(4*k) = 2*k-1, a(4*k-2) = 2*k, for k >= 1. %F A121496 From _Colin Barker_, Apr 08 2016: (Start) %F A121496 a(n) = a(n-1) + a(n-4) - a(n-5) for n > 5. %F A121496 G.f.: x*(1+x-x^3+x^4) / ((1-x)^2*(1+x)*(1+x^2)). (End) %F A121496 a(n) = (2*n+1-4*cos(n*Pi/2)-cos(n*Pi))/4. - _Wesley Ivan Hurt_, Oct 02 2017 %e A121496 The fifth run of successive numbers in A068225 is 8, 9, 10 with run length three so a(5) = 3. %t A121496 Rest@ CoefficientList[Series[x (1 + x - x^3 + x^4)/((1 - x)^2*(1 + x) (1 + x^2)), {x, 0, 75}], x] (* _Michael De Vlieger_, Oct 02 2017 *) %o A121496 (PARI) a(n) = if(n%2==1,(n+1)/2,if(n%4==0,(n/2)-1,(n/2)+1)) %o A121496 for(n=1,80,print1(a(n),", ")) %o A121496 (PARI) Vec(x*(1+x-x^3+x^4)/((1-x)^2*(1+x)*(1+x^2)) + O(x^100)) \\ _Colin Barker_, Apr 08 2016 %Y A121496 Cf. A000027, A068225, A103889. %K A121496 nonn,easy %O A121496 1,2 %A A121496 _Rick L. Shepherd_, Aug 03 2006