|
|
A249121
|
|
a(n) = n - (sum of digits of n) - (product of digits of n).
|
|
2
|
|
|
0, -1, -2, -3, -4, -5, -6, -7, -8, -9, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 27, 24, 21, 18, 15, 12, 9, 6, 3, 0, 36, 32, 28, 24, 20, 16, 12, 8, 4, 0, 45, 40, 35, 30, 25, 20, 15, 10, 5, 0, 54, 48, 42, 36, 30, 24, 18, 12, 6, 0, 63, 56, 49, 42, 35, 28, 21, 14, 7, 0, 72, 64, 56
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
In the graph, the upper bound is the line:
a(10*m) = 9m: a(10) = 9, a(20) = 18, a(30) = 27,...
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
a:= n-> (l-> n-add(i, i=l)-mul(i, i=l))(convert(n, base, 10)):
|
|
MATHEMATICA
|
Table[id = IntegerDigits[n]; n - (Plus @@ id) - (Times @@ id), {n, 0, 200}]
|
|
PROG
|
(PARI) a(n)=d=digits(n); if(!n, return(0)); n-sumdigits(n)-prod(i=1, #d, d[i])
vector(100, n, a(n-1)) \\ Derek Orr, Oct 21 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|