OFFSET
0,3
COMMENTS
Without the condition that the numbers are distinct the answers are infinite because 1+1+1+...+1 = 1 in lunar arithmetic - see A087061.
LINKS
D Applegate and N. J. A. Sloane, Table of n, a(n) for n = 0..2000
D. Applegate, C program for lunar arithmetic and number theory [Note: we have now changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing]
D. Applegate, M. LeBrun and N. J. A. Sloane, Dismal Arithmetic, arXiv:1107.1130 [math.NT], 2011. [Note: we have now changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing]
D. Applegate, M. LeBrun and N. J. A. Sloane, Dismal Arithmetic, J. Int. Seq. 14 (2011) # 11.9.8.
FORMULA
For 1 <= a < 10 and 0 <= b < 10, a(10a+b) = 2^(ab+a+b-1)+(2^a-1)(2^b-1)2^(ab-1). - David Wasserman, Apr 14 2005
EXAMPLE
a(5) = 16: we can write 5 = 5 + any subset of {4, 3, 2, 1} (16 ways).
a(12) = 22: we can write 12 = 12 + any subset of {11, 10, 2, 1} (16 ways), 12 = 2 + 11 + 10 = 2 + 11 = 2 + 10 and those three with 1 added (6 ways).
PROG
(PARI) A087079(n) = { my(v, r = 0, i, j, b); v = select(x -> x != 0, digits(n)); for (i = 0, 2^#v - 1, b = Vecrev(binary(i)); b = vector(#v, i, if (i <= #b, b[i], 0)); r += (-1)^vecsum(b) * 2^prod(j = 1, #v, if (b[j] == 1, v[j], v[j] + 1)); ); r/2; } /* Jerome Raulin, Feb 15 2017 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Marc LeBrun, Oct 09 2003
EXTENSIONS
More terms from David Wasserman, Apr 14 2005
STATUS
approved