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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A051801 Product of nonzero digits of n. 14
1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 2, 4, 6, 8, 10, 12, 14, 16, 18, 3, 3, 6, 9, 12, 15, 18, 21, 24, 27, 4, 4, 8, 12, 16, 20, 24, 28, 32, 36, 5, 5, 10, 15, 20, 25, 30, 35, 40, 45, 6, 6, 12, 18, 24, 30, 36, 42, 48, 54, 7, 7, 14, 21 (list; graph; refs; listen; history; internal format)
OFFSET

0,3

LINKS

Zak Seidov, Table of n, a(n) for n = 0..1000.

FORMULA

a(n) = if n=0 then 1 else a([n/10]) * (n mod 10 + 0^(n mod 10)). [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Oct 13 2009]

EXAMPLE

a(0) = 1 since an empty product is 1 by convention. a(120) = 1*2 = 2.

MAPLE

A051801 := proc(n) local d, j: d:=convert(n, base, 10): return mul(`if`(d[j]=0, 1, d[j]), j=1..nops(d)): end: seq(A051801(n), n=0..100); # Nathaniel Johnston, May 04 2011

MATHEMATICA

(Times@@Cases[IntegerDigits[#], Except[0]])&/@Range[0, 80] (* From Harvey P. Dale, June 20 2011 *)

PROG

(Haskell)

a051801 0 = 1

a051801 n = (a051801 n') * (m + 0 ^ m) where (n', m) = divMod n 10

-- Reinhard Zumkeller, Nov 23 2011

CROSSREFS

Basis for A051802.

Sequence in context: A067456 A052429 A051802 * A071205 A066750 A032762

Adjacent sequences:  A051798 A051799 A051800 * A051802 A051803 A051804

KEYWORD

nonn,easy,base,nice

AUTHOR

Dan Hoey (Hoey(AT)AIC.NRL.Navy.Mil), Dec 09 1999

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 11:47 EST 2012. Contains 205907 sequences.