Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #26 Jul 31 2022 07:49:51
%S 66,159,167,176,195,235,253,325,333,352,519,523,532,591,617,671,716,
%T 761,915,951,1168,1186,1236,1263,1326,1362,1618,1623,1632,1681,1816,
%U 1861,2136,2163,2316,2361,2613,2631,3126,3162,3216,3261,3612,3621,6118
%N Positive numbers whose product of digits is three times their sum.
%H Harry J. Smith, <a href="/A062035/b062035.txt">Table of n, a(n) for n = 1..500</a>
%e 235 belongs to the sequence as (2*3*5)/(2+3+5) = 30/10 = 3.
%t s3Q[n_]:=Module[{idn=IntegerDigits[n]},3Total[idn]==Times@@idn]; Select[Range[7000],s3Q] (* _Harvey P. Dale_, Mar 20 2011 *)
%o (PARI) isok(n) = my(d=digits(n)); vecprod(d)==3*vecsum(d) \\ _Mohammed Yaseen_, Jul 29 2022
%o (Python)
%o from math import prod
%o def ok(n): d = list(map(int, str(n))); return prod(d) == 3*sum(d)
%o print([k for k in range(1, 7000) if ok(k)]) # _Michael S. Branicky_, Jul 29 2022
%Y Cf. A011540, A034710, A062034, A062036, A062382, A062037, A062384, A062040, A062041, A062043, A062045.
%K nonn,base,easy
%O 1,1
%A _Amarnath Murthy_, Jun 27 2001
%E Corrected and extended by _Harvey P. Dale_ and Larry Reeves (larryr(AT)acm.org), Jul 04 2001
%E Offset corrected by _Mohammed Yaseen_, Jul 29 2022