OFFSET
1,1
COMMENTS
A generalization of A064413.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Gordon Hamilton, The EKG Sequence and the Tree of Numbers
Eric Weisstein's World of Mathematics, EKG Sequence
PROG
(Haskell)
import Data.List (delete)
a169849 n = a169849_list !! (n-1)
a169849_list = 9 : ekg 9 (delete 9 [2..]) where
ekg x zs = f zs where
f (y:ys) = if gcd x y > 1 then y : ekg y (delete y zs) else f ys
-- Reinhard Zumkeller, Jul 04 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe and N. J. A. Sloane, Jun 02 2010
STATUS
approved