A062034 Positive numbers whose product of digits is twice the sum of the digits.
36, 44, 63, 138, 145, 154, 183, 224, 242, 318, 381, 415, 422, 451, 514, 541, 813, 831, 1146, 1164, 1225, 1233, 1252, 1323, 1332, 1416, 1461, 1522, 1614, 1641, 2125, 2133, 2152, 2215, 2222, 2251, 2313, 2331, 2512, 2521, 3123, 3132, 3213, 3231, 3312, 3321
Offset: 1
Examples
1225 belongs to the sequence as (1*2*2*5)/(1+2+2+5) =20/10 = 2.
Links
- Harry J. Smith, Table of n, a(n) for n = 1..500
Crossrefs
Programs
-
Mathematica
Select[Range[4000],Times@@IntegerDigits[#]==2Total[IntegerDigits[#]]&] (* Harvey P. Dale, Dec 11 2016 *)
-
PARI
isok(n) = my(d=digits(n)); vecprod(d)==2*vecsum(d) \\ Mohammed Yaseen, Jul 28 2022
-
Python
from math import prod def ok(n): d = list(map(int, str(n))); return prod(d) == 2*sum(d) print([k for k in range(1, 4000) if ok(k)]) # Michael S. Branicky, Jul 28 2022
Extensions
Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jul 06 2001
Offset corrected by Mohammed Yaseen, Jul 28 2022