OFFSET
1,1
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The EKG sequence, arXiv:math/0204011 [math.NT]; Exper. Math. 11 (2002), 437-446.
MATHEMATICA
ekg[s_List] := Block[{m = s[[-1]], k = 3}, While[MemberQ[s, k] || GCD[m, k] == 1, k++]; Append[s, k]]; A064413 = Nest[ekg, {1, 2}, 200];
Position[A064413, _?EvenQ] // Flatten (* Jean-François Alcover, Aug 02 2018, after Robert G. Wilson v *)
PROG
(Haskell)
import Data.List (findIndices)
a064953 n = a064953_list !! (n-1)
a064953_list = map (+ 1) $ findIndices even a064413_list
-- Reinhard Zumkeller, Sep 17 2001
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 30 2001
STATUS
approved