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