login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A063543 a(n) = n - product of nonzero digits of n. 6
0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 18, 19, 18, 17, 16, 15, 14, 13, 12, 11, 27, 28, 26, 24, 22, 20, 18, 16, 14, 12, 36, 37, 34, 31, 28, 25, 22, 19, 16, 13, 45, 46, 42, 38, 34, 30, 26, 22, 18, 14, 54, 55, 50, 45, 40, 35, 30, 25, 20, 15, 63, 64, 58 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,10

LINKS

Harry J. Smith, Table of n, a(n) for n = 1..2000

N. J. A. Sloane and Brady Haran, Amazing Graphs II (including Star Wars), Numberphile video (2019).

EXAMPLE

a(20) = 20 - 2 = 18.

MAPLE

a:= n-> n-mul(i, i=subs(0=1, convert(n, base, 10))):

seq(a(n), n=1..80); # Alois P. Heinz, Aug 18 2019

MATHEMATICA

Table[n - Times@@DeleteCases[IntegerDigits[n], 0], {n, 70}] (* Alonso del Arte, Dec 15 2013 *)

PROG

(PARI) ProdNzD(x)= { local(d, p); p=1; while (x>9, d=x-10*(x\10); if (d, p*=d); x\=10); return(p*x) }

{ for (n=1, 2000, write("b063543.txt", n, " ", n - ProdNzD(n)) ) } \\ Harry J. Smith, Aug 25 2009

(PARI) a(n) = my(d=select(x->(x!=0), digits(n))); n - vecprod(d); \\ Michel Marcus, Jan 13 2020

(Python)

def a(n):

digits = map(int, str(n))

product = 1

for d in digits:

if d != 0:

product *= d

return n - product

[a(n) for n in range(20)]

# Elisabeth Zemack, Sep 16 2019; corrected by Fabio Somenzi, Jan 13 2020

(Magma) [n - &*[a: k in [1..#Intseq(n)] | a ne 0 where a is Intseq(n)[k]]: n in [1..100]]; // Marius A. Burtea, Sep 16 2019

CROSSREFS

Cf. A063114.

Sequence in context: A158001 A157763 A010735 * A096166 A240919 A078548

Adjacent sequences: A063540 A063541 A063542 * A063544 A063545 A063546

KEYWORD

nonn,base,easy,look

AUTHOR

N. J. A. Sloane, Aug 14 2001

EXTENSIONS

More terms from Larry Reeves (larryr(AT)acm.org), Aug 14 2001

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 4 07:34 EST 2022. Contains 358544 sequences. (Running on oeis4.)