|
Search: id:A078783
|
|
|
| A078783 |
|
a(0) = 0; a(1)=1; for n>1, a(n) = least positive integer m not among a(1),...,a(n-1) such that |m-a(n-1)| > |a(n-1)-a(n-2)|. |
|
+0 6
|
|
| 0, 1, 3, 6, 2, 7, 13, 4, 14, 25, 5, 26, 48, 8, 49, 91, 9, 92, 176, 10, 177, 345, 11, 346, 682, 12, 683, 1355, 15, 1356, 2698, 16, 2699, 5383, 17, 5384, 10752, 18, 10753, 21489, 19, 21490, 42962, 20, 42963, 85907, 21, 85908, 171796, 22, 171797
(list; graph; listen)
|
|
|
OFFSET
|
0,3
|
|
|
COMMENT
|
This is a permutation pi of the nonnegative integers such that |pi(n+1)-pi(n)| is strictly increasing. In other words, it is a walk on the nonnegative numbers with strictly increasing step size which visits every number exactly once.
A greedy version of Recaman's sequence: Construct two sequences a() and d() as follows. a(0)=0, a(1)=1, a(2)=3, d(0)=0, d(1)=1, d(2)=2. For n>=3, let m be smallest nonnegative number not yet in the a sequence. Let i = a(n-1)-m. If i > d(n), then a(n) = a(n-1)-i = m, d(n) = i; otherwise a(n) = a(n-1)+d(n-1)+1, d(n) = d(n-1)+1. Has the properties that a() is the Recaman transform of d(), and every number appears in a(). This sequence is a(), while d() is A117073. Has a natural decompostion into segments of length 3. - njas, Apr 16 2006
|
|
REFERENCES
|
N. J. A. Sloane and A. R. Wilks, On sequences of Recaman type, paper in preparation, 2006.
|
|
CROSSREFS
|
Cf. A072007, A005132, A117070-A117075.
Sequence in context: A046901 A105332 A072007 this_sequence A125717 A065232 A074170
Adjacent sequences: A078780 A078781 A078782 this_sequence A078784 A078785 A078786
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
Reiner Martin (reinermartin(AT)hotmail.com), Jan 09 2003
|
|
|
Search completed in 0.002 seconds
|