OFFSET
1,1
COMMENTS
Alternating sum starts with plus after the most significant digit, for example
1+0-1 = 0, so 101 is in the sequence, also
4+3-7 = 0, 1+0-7+6 = 0, so 437 and 1076 are in the sequence.
PROG
(Python)
a = []
for n in range(1, 2000):
t = str(n)
s = int(t[0])
s += sum((-1)**i * int(d) for i, d in enumerate(t[1:]))
if s == 0:
a.append(n)
print(a)
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Alex Ratushnyak, Aug 08 2012
STATUS
approved