OFFSET
1,4
COMMENTS
Zeros appear at A152458.
LINKS
Peter Kagey, 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], 2002.
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The EKG Sequence, Exper. Math. 11 (2002), 437-446.
MATHEMATICA
terms = 100;
ekg[s_] := Block[{m = s[[-1]], k = 3}, While[MemberQ[s, k] || GCD[m, k] == 1, k++]; Append[s, k]];
Nest[ekg, {1, 2}, terms-2] - Range[terms] (* Jean-François Alcover, Sep 10 2018, after Robert G. Wilson v *)
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Nov 28 2001
STATUS
approved
