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 A079623 #19 Sep 11 2024 12:23:31 %S A079623 1,1,4,2,3,3,2,4,1,5,0,6,1,5,2,4,3,3,4,2,5,1,6,0,7,1,6,2,5,3,4,4,3,5, %T A079623 2,6,1,7,0,8,1,7,2,6,3,5,4,4,5,3,6,2,7,1,8,0,9,1,8,2,7,3,6,4,5,5,4,6, %U A079623 3,7,2,8,1,9,0,10,1,9,2,8,3,7,4,6,5,5,6,4,7,3,8,2,9,1,10,0,11,1,10,2,9,3,8 %N A079623 a(1) = a(2) = 1, a(3)=4, a(n) = abs(a(n-1) - a(n-2) - a(n-3)). %H A079623 Reinhard Zumkeller, <a href="/A079623/b079623.txt">Table of n, a(n) for n = 1..10000</a> %F A079623 a(n*(n-10)) = 0. %F A079623 Max( a(k) : 1<=k<=n) = floor(sqrt(n+24)). %t A079623 nxt[{a_,b_,c_}]:={b,c,Abs[c-b-a]}; NestList[nxt,{1,1,4},110][[All,1]] (* _Harvey P. Dale_, Aug 12 2020 *) %o A079623 (Haskell) %o A079623 a079623 n = a079623_list !! (n-1) %o A079623 a079623_list = 1 : 1 : 4 : zipWith3 (\u v w -> abs (w - v - u)) %o A079623 a079623_list (tail a079623_list) (drop 2 a079623_list) %o A079623 -- _Reinhard Zumkeller_, Oct 11 2014 %o A079623 (Magma) %o A079623 m:=120; %o A079623 A079623:=[n le 3 select 4^Floor((n-1)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]]; %o A079623 [A079623[n]: n in [1..m]]; // _G. C. Greubel_, Sep 11 2024 %o A079623 (SageMath) %o A079623 @CachedFunction %o A079623 def a(n): # a = A079623 %o A079623 if n<4: return 4^((n-1)//2) %o A079623 else: return abs(a(n-1)-a(n-2)-a(n-3)) %o A079623 [a(n) for n in range(1,101)] # _G. C. Greubel_, Sep 11 2024 %Y A079623 Cf. A077623, A077653, A078108, A079624, A080096, A088226. %K A079623 nonn %O A079623 1,3 %A A079623 _Benoit Cloitre_, Jan 30 2003