Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A062329
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A062329 Sum of digits of n - product of digits of n. +0
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; listen)
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)

PROGRAM

(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 this_sequence A022958 A023444 A136868

Adjacent sequences: A062326 A062327 A062328 this_sequence 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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research