A062035 Positive numbers whose product of digits is three times their sum.
66, 159, 167, 176, 195, 235, 253, 325, 333, 352, 519, 523, 532, 591, 617, 671, 716, 761, 915, 951, 1168, 1186, 1236, 1263, 1326, 1362, 1618, 1623, 1632, 1681, 1816, 1861, 2136, 2163, 2316, 2361, 2613, 2631, 3126, 3162, 3216, 3261, 3612, 3621, 6118
Offset: 1
Examples
235 belongs to the sequence as (2*3*5)/(2+3+5) = 30/10 = 3.
Links
- Harry J. Smith, Table of n, a(n) for n = 1..500
Crossrefs
Programs
-
Mathematica
s3Q[n_]:=Module[{idn=IntegerDigits[n]},3Total[idn]==Times@@idn]; Select[Range[7000],s3Q] (* Harvey P. Dale, Mar 20 2011 *)
-
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
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
Comments