login
A091766
For n > 2, let m be the least number that cannot be expressed as a(i), a(i)+a(j), or a(i)-a(j) with i, j < n. Then a(n) = a(n-1)+m.
1
1, 2, 6, 15, 25, 36, 48, 66, 86, 108, 136, 165, 197, 236, 279, 323, 368, 420, 473, 528, 584, 642, 701, 763, 832, 906, 981, 1057, 1134, 1212, 1302, 1396, 1491, 1587, 1685, 1788, 1892, 2004, 2117, 2232, 2348, 2466, 2585, 2705, 2829, 2954, 3081, 3220, 3365
OFFSET
0,2
COMMENTS
This can be treated as sequence of weights, one each of distinct denominations, so that any value of weight r units can be measured using at most two weights placing them in either side of the balance. E.g., 19 = 25 - 6 = a(5) - a(3).
n = x*a(k) + y*a(m), where x and y can take values -1, 0 or 1, has a solution. Sequence A000244 gives sequence of weights with no restriction on the number of weights.
FORMULA
For n > 2, a(n) = a(n-1) + A091767(n-1) + 1. - David Wasserman, Apr 24 2006
EXAMPLE
Using first three terms 1,2 and 6 all numbers up to 8 can be obtained in this manner. (1), (2), (3=1+2), (4= 6-2), (5=6-1), (6), (7=6+1), (8=6+2) hence a(4) = 15 and 9 = 15-6.
PROG
(PARI) A = vector(100); A[1] = 1; v = A; A[2] = 2; made = vector(50000); x = 4; for (n = 3, 100, A[n] = A[n - 1] + x; made[A[n]] = 1; for (i = 1, n - 1, made[A[n] - A[i]] = 1; made[A[n] + A[i]] = 1); while (made[x], x++)); print(A) \\ David Wasserman, Apr 24 2006
CROSSREFS
Sequence in context: A050508 A033298 A153274 * A269706 A293402 A192691
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Feb 08 2004
EXTENSIONS
More terms from David Wasserman, Apr 24 2006
STATUS
approved