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 A077653 #14 Sep 11 2024 02:26:42 %S A077653 1,2,2,1,3,0,4,1,3,2,2,3,1,4,0,5,1,4,2,3,3,2,4,1,5,0,6,1,5,2,4,3,3,4, %T A077653 2,5,1,6,0,7,1,6,2,5,3,4,4,3,5,2,6,1,7,0,8,1,7,2,6,3,5,4,4,5,3,6,2,7, %U A077653 1,8,0,9,1,8,2,7,3,6,4,5,5,4,6,3,7,2,8,1,9,0,10,1,9,2,8,3,7,4,6,5,5,6,4,7 %N A077653 a(1)=1, a(2)=2, a(3)=2, a(n) = abs(a(n-1) - a(n-2) - a(n-3)). %C A077653 Conjecture : let z(1)=x; z(2)=y; z(3)= z; z(n)=abs(z(n-1)-z(n-2)-z(n-3)) if z(n) is unbounded (i.e. x,y,z are such that z(n) doesn't reach a cycle of length 2), then there are 2 integers n(x,y,z) and w(x,y,z) such that M(n) = floor(sqrt(n+w(x,y,z))) for n>n(,x,y,z) where M(n) = Max ( a(k) : 1<=k<=n ). As example : w(1,2,2)=9 n(1,2,2)=4; w(1,2,4)=29 n(1,2,4)=4; w(1,2,8)=157 n(1,2,8)=9 %H A077653 Reinhard Zumkeller, <a href="/A077653/b077653.txt">Table of n, a(n) for n = 1..10000</a> %F A077653 a(n)/sqrt(n) is bounded. More precisely, let M(n) = Max ( a(k) : 1<=k<=n ); then M(n)= floor(sqrt(n+9)) for n>4 %t A077653 nxt[{a_,b_,c_}]:={b,c,Abs[c-b-a]}; NestList[nxt,{1,2,2},110][[All,1]] (* _Harvey P. Dale_, Sep 01 2020 *) %o A077653 (Haskell) %o A077653 a077653 n = a077653_list !! (n-1) %o A077653 a077653_list = 1 : 2 : 2 : zipWith3 (\u v w -> abs (w - v - u)) %o A077653 a077653_list (tail a077653_list) (drop 2 a077653_list) %o A077653 -- _Reinhard Zumkeller_, Oct 11 2014 %o A077653 (Magma) %o A077653 m:=120; %o A077653 A077653:=[n le 3 select Floor((n+2)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]]; %o A077653 [A077653[n]: n in [1..m]]; // _G. C. Greubel_, Sep 11 2024 %o A077653 (SageMath) %o A077653 @CachedFunction %o A077653 def a(n): # a = A077653 %o A077653 if n<4: return int((n+2)//2) %o A077653 else: return abs(a(n-1)-a(n-2)-a(n-3)) %o A077653 [a(n) for n in range(1,101)] # _G. C. Greubel_, Sep 11 2024 %Y A077653 Cf. A077623, A079623, A079624, A080096, A088226. %K A077653 nonn %O A077653 1,2 %A A077653 _Benoit Cloitre_, Dec 02 2002