OFFSET
1,2
COMMENTS
Conjectured to be a permutation of the positive integers.
See also A255972 for this conjecture. - Reinhard Zumkeller, Mar 12 2015
LINKS
Peter J. C. Moses, Table of n, a(n) for n = 1..5000
David L. Applegate, Hans Havermann, Bob Selcoe, Vladimir Shevelev, N. J. A. Sloane, and Reinhard Zumkeller, The Yellowstone Permutation, arXiv preprint arXiv:1501.01669 [math.NT], 2015 and J. Int. Seq. 18 (2015) 15.6.7.
MATHEMATICA
a[n_] := a[n] = If[n <= 3, n, For[k = 1, True, k++, If[FreeQ[Array[a, n-1], k], If[!CoprimeQ[k, a[n-2]+a[n-1]] && CoprimeQ[k, a[n-1]], Return[k]]]]];
Array[a, 65] (* Jean-François Alcover, Jul 31 2018 *)
PROG
(Haskell)
import Data.List (delete)
a251604 n = a251604_list !! (n-1)
a251604_list = 1 : 2 : 3 : f 2 3 [4..] where
f u v ws = g ws where
g (x:xs) = if gcd x (u + v) > 1 && gcd x v == 1
then x : f v x (delete x ws) else g xs
-- Reinhard Zumkeller, Mar 12 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Dec 13 2014
EXTENSIONS
More terms from Peter J. C. Moses, Dec 13 2014
STATUS
approved