A169837 EKG sequence started at 3 instead of 2.
3, 6, 2, 4, 8, 10, 5, 15, 9, 12, 14, 7, 21, 18, 16, 20, 22, 11, 33, 24, 26, 13, 39, 27, 30, 25, 35, 28, 32, 34, 17, 51, 36, 38, 19, 57, 42, 40, 44, 46, 23, 69, 45, 48, 50, 52, 54, 56, 49, 63, 60, 55, 65, 70, 58, 29, 87, 66, 62, 31, 93, 72, 64, 68, 74, 37, 111, 75, 78, 76, 80, 82, 41
Offset: 1
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Gordon Hamilton, The EKG Sequence and the Tree of Numbers
- Eric Weisstein's World of Mathematics, EKG Sequence
- Index entries for sequences related to EKG sequence
Programs
-
Haskell
import Data.List (delete) a169837 n = a169837_list !! (n-1) a169837_list = 3 : ekg 3 (2 : [4..]) where ekg x zs = f zs where f (y:ys) = if gcd x y > 1 then y : ekg y (delete y zs) else f ys -- Reinhard Zumkeller, Jul 04 2014
Comments