login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062329 Sum of digits of n - product of digits of n. 7
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 (list; graph; refs; listen; history; internal format)
OFFSET

0,21

LINKS

Harry J. Smith, Table of n, a(n) for n=0,...,1000

EXAMPLE

a(23) = 2+3 - 2*3 = -1.

a(49) = -(4*9)+(4+9) = -36 + 13 = -23.

MATHEMATICA

f[n_] := (a = IntegerDigits[n]; Plus @@ a - Times @@ a); Table[ f[n], {n, 0, 75}] (Robert G. Wilson v)

PROG

(PARI) SumD(x)= { s=0; while (x>9, s+=x-10*(x\10); x\=10); return(s + x) } ProdD(x)= { p=1; while (x>9, p*=x-10*(x\10); x\=10); return(p*x) } { for (n=0, 1000, write("b062329.txt", n, " ", SumD(n) - ProdD(n)) ) } [From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Aug 05 2009]

CROSSREFS

Cf. A007953, A007954, A034710, A062996, A062997, A062998, A062999, A070565.

Sequence in context: A053646 A080776 A065358 * A022958 A023444 A136868

Adjacent sequences:  A062326 A062327 A062328 * A062330 A062331 A062332

KEYWORD

sign,base,easy

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Jun 21 2001

EXTENSIONS

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jun 22 2001

Signed version from Henry Bottomley (se16(AT)btinternet.com), Jun 29 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 20:14 EST 2012. Contains 205962 sequences.