login

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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A066307
Nonprimes whose sum of digits is equal to its product of digits.
6
1, 4, 6, 8, 9, 22, 123, 132, 213, 231, 312, 321, 1124, 1142, 1214, 1241, 1412, 1421, 2114, 4112, 4121, 11125, 11133, 11152, 11215, 11222, 11313, 11331, 11512, 11521, 12115, 12122, 12151, 12212, 12221, 13113, 13131, 13311, 15112, 15211, 21115
OFFSET
1,2
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (n = 1..516 from Harry J. Smith)
EXAMPLE
321 = 3*107, 3 + 2 + 1 = 6 = 3*2*1.
MATHEMATICA
sdpdQ[n_]:=Module[{idn=IntegerDigits[n]}, Total[idn]==Times@@idn]; Module[ {upto=25000, cs}, cs=Complement[Range[upto], Prime[Range[PrimePi[upto]]]]; Select[cs, sdpdQ]] (* Harvey P. Dale, Oct 14 2014 *)
PROG
(PARI) isok(k) = {if(isprime(k), 0, my(d=digits(k)); vecprod(d) == vecsum(d))} \\ Harry J. Smith, Feb 09 2010
CROSSREFS
Composites and 1 from A034710.
Sequence in context: A078337 A046351 A161732 * A287198 A099071 A156673
KEYWORD
base,nonn,changed
AUTHOR
Labos Elemer, Dec 13 2001
STATUS
approved