login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A061882
a(n) = Smallest nontrivial number k > 9 such that first (leftmost) digit - second digit + third digit - fourth digit ... of k = n.
27
11, 10, 20, 30, 40, 50, 60, 70, 80, 90, 109, 209, 309, 409, 509, 609, 709, 809, 909, 10909, 20909, 30909, 40909, 50909, 60909, 70909, 80909, 90909, 1090909, 2090909, 3090909, 4090909, 5090909, 6090909, 7090909, 8090909, 9090909, 109090909
OFFSET
0,1
COMMENTS
Starting with 109, this sequence has the same terms as A060982 and A061479. - Georg Fischer, May 24 2022
PROG
(PARI) a(n) = my(k=1, d=digits(k)); while (sum(k=1, #d, (-1)^(k+1)*d[k]) != n, k++; d=digits(k)); k; \\ Michel Marcus, May 24 2022
KEYWORD
base,nonn,easy
AUTHOR
Larry Reeves (larryr(AT)acm.org), May 15 2001
EXTENSIONS
Definition amended by Georg Fischer, May 24 2022
STATUS
approved