OFFSET
1,2
COMMENTS
A permutation of the natural numbers.
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, Exper. Math. 11 (2002), 437-446.
MATHEMATICA
PROG
(Haskell)
import Data.List (delete)
a064418 n = a064418_list !! (n-1)
a064418_list = 1 : 2 : 3 : 4 : (f 4 [5..]) where
f :: Integer -> [Integer] -> [Integer]
f x xs = m : (f m $ delete m xs) where
m = head $ dropWhile ((< 4) . (gcd x)) xs
-- Reinhard Zumkeller, Feb 20 2011
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
Jonathan Ayres (Jonathan.ayres(AT)btinternet.com), Sep 30 2001
EXTENSIONS
More terms from Naohiro Nomoto, Sep 30 2001
STATUS
approved