OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, EKG Sequence
MATHEMATICA
a = {1, 4}; Do[k = 6; While[Or[PrimeQ@ k, MemberQ[a, k], CoprimeQ[a[[i - 1]], k]], k++]; AppendTo[a, k], {i, 3, 66}]; a (* Michael De Vlieger, Sep 01 2016 *)
PROG
(Haskell)
import Data.List (delete, genericIndex)
a240024 n = genericIndex a240024_list (n - 1)
a240024_list = 1 : ekg 4 a002808_list 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
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 30 2014
STATUS
approved