OFFSET
1,4
COMMENTS
Adding gcd(a(n), a(n-1)) gives the natural numbers (with an extra 1).
Does every positive integer occur as a difference in this sequence? In the first 100000 terms, the maximum difference is 21, and only 14, 15, and 16 are missing up to 21.
LINKS
Franklin T. Adams-Watters, Table of n, a(n) for n = 1..10000
MATHEMATICA
nxt[{a_, b_, c_}]:={b, c, c+GCD[c, a]}; NestList[nxt, {1, 1, 1}, 60][[;; , 1]] (* Harvey P. Dale, May 07 2023 *)
PROG
(PARI) alist(n) = my(r=vector(n)); r[1]=r[2]=r[3]=1; for(k=4, n, r[k]=r[k-1]+gcd(r[k-1], r[k-3])); r
(Magma) I:=[1, 1, 1]; [n le 3 select I[n] else Self(n-1) + Gcd(Self(n-1), Self(n-3)): n in [1..70]]; // Vincenzo Librandi, Jul 19 2015
(Haskell)
a260194 n = a260194_list !! (n-1)
a260194_list = 1 : 1 : 1 : f 1 1 1 where
f u v v' = w : f w u v where w = u + gcd u (u + v')
-- Reinhard Zumkeller, Jul 19 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Jul 18 2015
STATUS
approved