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
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Feb 08 2004
EXTENSIONS
More terms from David Wasserman, Apr 24 2006
STATUS
approved