OFFSET
1,2
COMMENTS
This smoothing of A064413 is discussed in Lagarias et al. (2002).
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], 2002.
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The EKG Sequence, Exper. Math. 11 (2002), 437-446.
MATHEMATICA
ekg[s_] := Block[{m = s[[-1]], k = 3}, While[MemberQ[s, k] || GCD[m, k] == 1, k++]; Append[s, k]];
Nest[ekg, {1, 2}, 100] /. {n_ /; PrimeQ[n] -> 2n, n_ /; PrimeQ[n/3] -> 2n/3 } (* Jean-François Alcover, Aug 04 2018, after Robert G. Wilson v *)
PROG
(Haskell)
a256417 = a256415 . a064413 -- Reinhard Zumkeller, Apr 06 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 05 2015
STATUS
approved