login
A260194
a(n+1) = a(n) + gcd(a(n),a(n-2)), with a(1) = a(2) = a(3) = 1
1
1, 1, 1, 2, 3, 4, 6, 9, 10, 12, 15, 20, 24, 27, 28, 32, 33, 34, 36, 39, 40, 44, 45, 50, 52, 53, 54, 56, 57, 60, 64, 65, 70, 72, 73, 74, 76, 77, 78, 80, 81, 84, 88, 89, 90, 92, 93, 96, 100, 101, 102, 104, 105, 108, 112, 119, 120, 128, 129, 132
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
Sequence in context: A249602 A119761 A144429 * A014851 A177919 A128399
KEYWORD
nonn
AUTHOR
STATUS
approved