OFFSET
1,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(n*(n-10)) = 0.
Max( a(k) : 1<=k<=n) = floor(sqrt(n+24)).
MATHEMATICA
nxt[{a_, b_, c_}]:={b, c, Abs[c-b-a]}; NestList[nxt, {1, 1, 4}, 110][[All, 1]] (* Harvey P. Dale, Aug 12 2020 *)
PROG
(Haskell)
a079623 n = a079623_list !! (n-1)
a079623_list = 1 : 1 : 4 : zipWith3 (\u v w -> abs (w - v - u))
a079623_list (tail a079623_list) (drop 2 a079623_list)
-- Reinhard Zumkeller, Oct 11 2014
(Magma)
m:=120;
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]];
[A079623[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
(SageMath)
@CachedFunction
def a(n): # a = A079623
if n<4: return 4^((n-1)//2)
else: return abs(a(n-1)-a(n-2)-a(n-3))
[a(n) for n in range(1, 101)] # G. C. Greubel, Sep 11 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jan 30 2003
STATUS
approved