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 A174314 #3 Jun 16 2016 23:27:42 %S A174314 1,2,1,2,2,1,2,1,1,2,2,2,2,2,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1, %T A174314 1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, %U A174314 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 %N A174314 Sequence given by a(0)=1, a(1)=2 and the recurrence relation: a(n)=a(abs(floor(0.5*n-a(n-2)))) for n>=2. %C A174314 We observe that the numbers of 1 obtained (between the 2), that is 1, 1, 1, 2, 6, 10, 18, define a sequence v for which v(n)=2^(n-2)+2 for n>=5. In the same vein, the numbers of 2 define a sequence w: 1, 2, 1, 5, for which w(n)=7*2^(n-3)-2. This explain the explicit formulas. %F A174314 For p>=1, if 9*2^p-4<=n<=11*2^p-3, then a(n)=1. For p>=0, if 11*2^p-2<=n<=9*2^(p+1)-5, then a(n)=2. %e A174314 a(2)=a(abs(floor(1-1)))=a(0)=1. a(3)=a(abs(floor(1.5-2)))=a(abs(floor(-0.5)))=a(abs(-1))=a(1)=2. a(4)=a(2-a(2))=a(1)=2. If 9*2-4<=n<=11*2-3, that is 14<=n<=19 then a(n)=1. If 11*2-2<=n<=9*2^2-5 that is 20<=n<=31 then a(n)=2. %p A174314 u(0):=1:u(1):=2: for n from 2 to 10000 do u(n):=u(abs(floor((1/2)*n-u(n-2)))):od:seq(u(n),n=0..10000); %K A174314 easy,nonn %O A174314 0,2 %A A174314 _Richard Choulet_, Mar 15 2010