A356080 Variation on Recamán's sequence (A005132) that is intended to be a permutation of the nonnegative integers, essentially as envisaged by the original comments in A078943. See comments below for details.
0, 1, 3, 6, 2, 7, 13, 20, 28, 37, 27, 16, 4, 17, 31, 46, 30, 47, 29, 48, 68, 89, 111, 134, 158, 133, 159, 132, 160, 131, 101, 70, 38, 5, 39, 74, 110, 147, 109, 148, 108, 149, 107, 150, 106, 151, 105, 58, 10, 59, 9, 60, 8, 61, 115, 170, 226, 283, 341, 400, 460, 399, 337, 274, 210, 145, 79, 12, 80, 11
Offset: 1
Keywords
Examples
a(2) = a(1) + 1 = 1, since a(1) - 1 = -1 is a negative integer. We now find the lexicographically earliest shortest route to the least missing number, 2. Any extension route has a(3) = a(2) + 2 = 3 since a(2) - 2 = -1 is a negative integer. Any extension route has a(4) = a(3) + 3 = 6, since a(3) - 3 = 0 is already in the sequence. So a(3) = 3, a(4) = 6, a(5) = a(4) - 4 = 2 is the only way to reach 2 by a(5); no shorter route exists. Lastly, we must check an onward route exists to a new record term (greater than 6). This is provided by a(6) = a(5) + 5 = 7, so we have determined a(3) = 3, a(4) = 6, a(5) = 2.
Links
- Peter Munn, Table of n, a(n) for n = 1..424
- Peter Munn and Ali Sada, Selection of relevant SeqFan posts, July 2022.
- Peter Munn, Initial validation program (LibreOffice Basic)
Formula
|a(n) - a(n+1)| = n.
If a(n) = a(m) then n = m.
Comments