OFFSET
0,1
COMMENTS
a(n) = 0 for all but finitely many n. In particular, a(n) = 0 for n > 123456789. - Charles R Greathouse IV, Aug 20 2012
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..34668
EXAMPLE
a(4) = 8 because 4 = 12-34-56-7+89 = 12-3-4-5-6-7+8+9 = 12-3+45-67+8+9 = 12-3+4-5+6+7-8-9 = 12-3+4+5-6-7+8-9 = 12+3-4-5+6-7+8-9 = 12+3-4+5-6-7-8+9 = 1+2-34+5+6+7+8+9 and only for these.
PROG
(Python)
from collections import Counter
from itertools import product, zip_longest
def aupton(nn):
digs = list("123456789")
c = Counter(eval("".join(filter(None, sum(zip_longest(digs, ops), ())))) for ops in product(["-", "+", ""], repeat=8))
return [c[k] for k in range(nn+1)]
print(aupton(70)) # Michael S. Branicky, Nov 26 2021
CROSSREFS
KEYWORD
nice,nonn,base
AUTHOR
Miklos SZABO (mike(AT)ludens.elte.hu), Feb 01 2002
STATUS
approved