|
| |
|
|
A113966
|
|
a(1)=1; for n>1, a(n) is the smallest positive integer not occurring earlier in the sequence such that |a(n)-a(n-1)| does not divide a(n).
|
|
2
| |
|
|
1, 3, 5, 2, 6, 10, 4, 7, 9, 11, 8, 13, 15, 17, 12, 19, 14, 18, 22, 16, 21, 23, 20, 26, 29, 24, 31, 25, 27, 32, 35, 33, 28, 34, 30, 37, 39, 41, 36, 43, 38, 42, 46, 40, 47, 44, 49, 45, 51, 53, 48, 55, 52, 57, 50, 54, 58, 61, 56, 59, 62, 65, 63, 67, 60, 68, 71, 64, 69, 73, 66, 70
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,2
|
|
|
COMMENTS
| Sequence is a permutation of the positive integers.
Proof that every number must eventually appear: Suppose not, let k be smallest number that never appears. Then for every a(n-1) > k, we have a(n-1)-k | k, i.e. i(a(n-1)-k) = k for some i with 1 <= i <= k. Therefore a(n-1) <= (k+ik)/k <= k(k+1). So once a(n-1) > k(k+1), we will have a(n) = k, a contradiction. - N. J. A. Sloane (njas(AT)research.att.com), Jan 29 2006
|
|
|
EXAMPLE
| Among those positive integers not among the first 4 integers of the sequence, a(5) = 6 is the smallest such that |a(5)-a(4)| = |6-2| = 4 does not divide a(5) =6. 4, for example, is not among the first 4 terms of the sequence, but |4-2| = 2 does divide 4. So a(5) is not 4, but is instead 6.
|
|
|
MATHEMATICA
| f[l_] := Block[{k=1}, While[MemberQ[l, k] || Mod[k, Abs[k - Last[l]]] == 0, k++ ]; Return[Append[l, k]]; ]; Nest[f, {1}, 100] (*Chandler*)
|
|
|
CROSSREFS
| Cf. A113963, A113967.
Sequence in context: A010782 A139584 A064790 * A164611 A182813 A073897
Adjacent sequences: A113963 A113964 A113965 * A113967 A113968 A113969
|
|
|
KEYWORD
| nonn,nice
|
|
|
AUTHOR
| Leroy Quet Nov 10 2005
|
|
|
EXTENSIONS
| Extended by Jim Nastos (nastos(AT)gmail.com) and Ray Chandler (rayjchandler(AT)sbcglobal.net), Nov 13 2005
|
| |
|
|