reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
terms = 100;
ekg[s_] := Block[{m = s[[-1]], k = 3}, While[MemberQ[s, k] || GCD[m, k] == 1, k++]; Append[s, k]];
EKG = Nest[ekg, {2, 4}, 2 terms];
a[1] = 0; a[n_] := FirstPosition[EKG, n] // First;
Array[a, terms] (* Jean-François Alcover, Aug 30 2018, after Robert G. Wilson v *)
approved
editing
More terms from _Naohiro Nomoto (n_nomoto(AT)yabumi.com), _, Sep 30 2001
<a href="/Sindx_index/Ed.html#EKG">Index entries for sequences related to EKG sequence</a>
<a href="/Sindx_Ed.html#EKG">Index entries for sequences related to EKG sequence</a>
nonn,new
nonn
<a href="http://www.research.att.com/~njas/sequences/Sindx_Ed.html#EKG">Index entries for sequences related to EKG sequence</a>
nonn,new
nonn
Term at which n appears in A064413 (if it begins at 2).
0, 1, 4, 2, 9, 3, 13, 7, 5, 8, 19, 6, 27, 12, 10, 16, 32, 11, 36, 17, 14, 18, 42, 15, 23, 26, 21, 25, 56, 22, 60, 30, 20, 31, 24, 29, 66, 35, 28, 39, 73, 34, 80, 40, 38, 41, 88, 44, 49, 45, 33, 46, 99, 47, 52, 48, 37, 55, 106, 51, 114, 59, 50, 63, 53, 58, 127, 64, 43, 54, 133
1,3
Every nonnegative number appears here exactly once.
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, <a href="http://arXiv.org/abs/math.NT/0204011">The EKG sequence</a>, Exper. Math. 11 (2002), 437-446.
<a href="http://www.research.att.com/~njas/sequences/Sindx_Ed.html#EKG">Index entries for sequences related to EKG sequence</a>
nonn
Jonathan Ayres (Jonathan.ayres(AT)btinternet.com), Sep 30 2001
More terms from Naohiro Nomoto (n_nomoto(AT)yabumi.com), Sep 30 2001
approved