OFFSET
0,5
COMMENTS
a(m) = a(n) if m and n have the same nonzero digits, irrespective of order. For example, a(6044005) = a(45604).
FORMULA
If n has digits n_1, n_2, ..., n_k and all digits n_i are even, then a(n) = (1/2)(n_1 + 1)(n_2 + 1)...(n_k + 1) - 1/2. Otherwise, a(n) = (1/2)(n_1 + 1)(n_2 + 1)...(n_k + 1) - 1. Equivalently, a(n) = ceiling((1/2)(n_1 + 1)(n_2 + 1)...(n_k + 1)) - 1 for all n.
a(n) = ceiling((1/2)*A089898(n)) - 1.
EXAMPLE
a(31) = 3 because there are three partitions of 31 into exactly two parts with no decimal carries: 30 + 1, 21 + 10, and 20 + 11.
a(100) = 0 because every partition of 100 into exactly two parts has at least one decimal carry.
MATHEMATICA
Ceiling[(1/2) Times @@ (IntegerDigits[n, 10] + 1)] - 1
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Jason Zimba, Jul 02 2020
STATUS
approved