login
A062329
a(n) = (sum of digits of n) - (product of digits of n).
8
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, 3, 1, -1, -3, -5, -7, -9, -11, -13, -15, 4, 1, -2, -5, -8, -11, -14, -17, -20, -23, 5, 1, -3, -7, -11, -15, -19, -23, -27, -31, 6, 1, -4, -9, -14, -19, -24, -29, -34, -39, 7, 1, -5, -11, -17, -23, -29, -35, -41, -47, 8, 1, -6, -13, -20, -27
OFFSET
0,21
LINKS
EXAMPLE
a(23) = 2 + 3 - 2*3 = -1.
a(49) = -(4*9) + (4 + 9) = -36 + 13 = -23.
MATHEMATICA
a[n_] := (t = IntegerDigits[n]; Plus @@ t - Times @@ t); Table[ a[n], {n, 0, 75}] (* Robert G. Wilson v *)
CROSSREFS
A063543 has a similar graph.
Sequence in context: A360659 A297158 A065358 * A022958 A023444 A248157
KEYWORD
sign,base,easy,look
AUTHOR
Amarnath Murthy, Jun 21 2001
EXTENSIONS
Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jun 22 2001
Signed version from Henry Bottomley, Jun 29 2001
STATUS
approved