OFFSET
1,1
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..500
EXAMPLE
235 belongs to the sequence as (2*3*5)/(2+3+5) = 30/10 = 3.
MATHEMATICA
s3Q[n_]:=Module[{idn=IntegerDigits[n]}, 3Total[idn]==Times@@idn]; Select[Range[7000], s3Q] (* Harvey P. Dale, Mar 20 2011 *)
PROG
(PARI) isok(n) = my(d=digits(n)); vecprod(d)==3*vecsum(d) \\ Mohammed Yaseen, Jul 29 2022
(Python)
from math import prod
def ok(n): d = list(map(int, str(n))); return prod(d) == 3*sum(d)
print([k for k in range(1, 7000) if ok(k)]) # Michael S. Branicky, Jul 29 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amarnath Murthy, Jun 27 2001
EXTENSIONS
Corrected and extended by Harvey P. Dale and Larry Reeves (larryr(AT)acm.org), Jul 04 2001
Offset corrected by Mohammed Yaseen, Jul 29 2022
STATUS
approved