OFFSET
1,2
COMMENTS
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
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
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
MATHEMATICA
nxt[{a_, b_, c_}]:={b, c, Abs[c-b-a]}; NestList[nxt, {1, 2, 2}, 110][[All, 1]] (* Harvey P. Dale, Sep 01 2020 *)
PROG
(Haskell)
a077653 n = a077653_list !! (n-1)
a077653_list = 1 : 2 : 2 : zipWith3 (\u v w -> abs (w - v - u))
a077653_list (tail a077653_list) (drop 2 a077653_list)
-- Reinhard Zumkeller, Oct 11 2014
(Magma)
m:=120;
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]];
[A077653[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
(SageMath)
@CachedFunction
def a(n): # a = A077653
if n<4: return int((n+2)//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, Dec 02 2002
STATUS
approved