|
Search: id:A064413
|
|
|
| A064413 |
|
EKG 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). |
|
+0 64
|
|
| 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
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
COMMENT
|
Theorem: (1) Every number appears exactly once: this is a permutation of the positive numbers. - J. C. Lagarias, E. M. Rains, N. J. A. Sloane, Oct 03, 2001
The permutation has cycles (1) (2) (3, 4, 6, 9, 10, 5) ( ..., 20, 18, 12, 7, 14, 13, 28, 26, ...) (8) ...
Theorem: (2) The primes appear in increasing order. - J. C. Lagarias, E. M. Rains, N. J. A. Sloane, Oct 03, 2001
Theorem: (3) When a prime p appears it is immediately preceded by 2p and followed by 3p. - Conjectured by Lagarias-Rains-Slaone, proved by Hofman-Pilipczuk.
Theorem: (4) Let a'(n) be the same sequence but with all terms p and 3p (p prime) changed to 2p. Then lim a'(n)/n = 1, i.e. a(n) ~ n except for for the values p and 3p for p prime. - Conjectured by Lagarias-Rains-Slaone, proved by Hofman-Pilipczuk.
Conjecture: A term p^2, p a prime, is immediately preceded by p*(p+1) and followed by p*(p+2) - Vladimir Baltic, Oct 03, 2001. This is false, for example the sequence contains the 3 terms p*(p+2), p^2, p*(p+3) for p = 157 - Eric Rains
Calculating the square of A064413 and plotting the results shows the EKG behavior even more dramatically - see A104125. - Parthasarathy Nambi (PachaNambi(AT)yahoo.com), Jan 27 2005
|
|
LINKS
|
Zak Seidov, Table of n, a(n) for n = 1..10000
Piotr Hofman and Marcin Pilipczuk, A few new facts about the EKG sequence (Preprint, 2007)
James Keener, Mathematics of EKG [Refers to EKGs found in hospitals, included for comparison.]
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The EKG sequence, Exper. Math. 11 (2002), 437-446.
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The EKG Sequence
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, Plot of a(1) to a(100), with successive points joined by lines.
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, Terms 800 to 1000, with successive points joined by lines.
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The first 1000 terms (represented by dots), successive points not joined.
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The first 10000 terms (represented by dots), successive points not joined.
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The sequence smoothed by replacing a(n)=p or 3p, p prime > 2, by a(n) = 2p.
I. Peterson, The EKG Sequence
N. J. A. Sloane, Seven Staggering Sequences.
Eric Weisstein's World of Mathematics, EKG Sequence
Index entries for sequences related to EKG sequence
Index entries for sequences that are permutations of the natural numbers
|
|
FORMULA
|
a(n) = smallest number not already used so that gcd(a(n), a(n-1)) > 1.
|
|
EXAMPLE
|
a(2) = 2, a(3) = 4 (gcd(2,4) = 2), a(4) = 6 (gcd(4,6) = 2), a(5) = 3 (gcd(6,3) = 3), a(6) = 9 (6 already used so next number which shares a factor is 9 since gcd(3,9) = 3).
|
|
MAPLE
|
h := array(1..20000); a := array(1..10000); maxa := 300; maxn := 2*maxa; for n from 1 to maxn do h[n] := -1; od: a[1] := 2; h[2] := 1; c := 2; for n from 2 to maxa do for m from 2 to maxn do t1 := gcd(m, c); if t1 > 1 and h[m] = -1 then c := m; a[n] := c; h[c] := n; break; fi; od: od: ap := []: for n from 1 to maxa do ap := [op(ap), a[n]]; od: hp := []: for n from 2 to maxa do hp := [op(hp), h[n]]; od: convert(ap, list); convert(hp, list); # this is very crude!
|
|
MATHEMATICA
|
maxN=100; lst={1, 2}; unused=Range[3, maxN]; found=True; While[found, found=False; i=0; While[ !found && i<Length[unused], i++; If[GCD[lst[[ -1]], unused[[i]]]>1, found=True; AppendTo[lst, unused[[i]]]; unused=Delete[unused, i]]]]; lst
|
|
CROSSREFS
|
See A064664 for the inverse permutation. See A064665-A064668 for the first two infinite cycles of this permutation. A064669 gives cycle representatives.
See A064421 for sequence giving term at which n appears.
See A064424, A074177 for records.
Adjacent sequences: A064410 A064411 A064412 this_sequence A064414 A064415 A064416
Sequence in context: A026200 A026218 A096665 this_sequence A122280 A057063 A002849
|
|
KEYWORD
|
nonn,nice,easy
|
|
AUTHOR
|
Jonathan Ayres (Jonathan.ayres(AT)btinternet.com), Sep 30 2001
|
|
EXTENSIONS
|
More terms from Naohiro Nomoto (n_nomoto(AT)yabumi.com), Sep 30 2001
Entry extensively revised by njas, Oct 10, 2001
|
|
|
Search completed in 0.003 seconds
|