This site is supported by donations to The OEIS Foundation.

# EKG sequence

From OeisWiki

(Redirected from Electrocardiogram sequence)

EKG sequence or electrocardiogram sequence: a(1) = 1; a(2) = 2; for n > 2, a(n) = smallest number not already used which shares a factor with a(n-1). (Cf. A064413)

- {1, 2, 4, 6, 3, 9, 12, 8, 10, 5, 15, 18, 14, 7, 21, 24, 16, 20, 22, 11, 33, 27, 30, 25, 35, 28, 26, 13, 39, 36, 32, 34, 17, 51, 42, 38, 19, 57, 45, 40, 44, 46, 23, 69, 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, ...}

When plotted as a connect-the-dots plot (see MathWorld link below,) the sequence looks somewhat like an electrocardiogram (abbreviated "EKG" in medical circles), so this sequence became known as the EKG sequence. Every number appears exactly once: this is a permutation of the positive integers. At the same time, the primes appear in ascending order. This sequence was discovered by Jonathan Ayres in 2001.

## External links

- J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The EKG Sequence, 2002.
- Weisstein, Eric W., EKG Sequence, from MathWorld—A Wolfram Web Resource.