login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062045 Positive numbers whose product of digits is 12 times their sum. 10

%I #20 Sep 13 2022 02:20:15

%S 666,1479,1497,1568,1586,1658,1685,1749,1794,1856,1865,1947,1974,2349,

%T 2394,2439,2446,2464,2493,2644,2934,2943,3249,3294,3345,3354,3429,

%U 3435,3453,3492,3534,3543,3924,3942,4179,4197,4239,4246,4264,4293,4329,4335,4353,4392

%N Positive numbers whose product of digits is 12 times their sum.

%H Harry J. Smith, <a href="/A062045/b062045.txt">Table of n, a(n) for n = 1..500</a>

%e 2349 belongs to the sequence as (2*3*4*9)/(2+3+4+9) = 216/18 = 12.

%t okQ[n_]:=Module[{idn=IntegerDigits[n]},Times@@idn/Total[idn]==12]

%t Select[Range[10000],okQ] (* _Harvey P. Dale_, Nov 25 2010 *)

%o (PARI) isok(n) = my(d=digits(n)); vecprod(d)==12*vecsum(d) \\ _Mohammed Yaseen_, Sep 12 2022

%o (Python)

%o from math import prod

%o def ok(n): d = list(map(int, str(n))); return prod(d) == 12*sum(d)

%o print([k for k in range(1, 4400) if ok(k)]) # _Michael S. Branicky_, Sep 12 2022

%Y Subsequence of A061013 and hence A038367 and A052382.

%Y Cf. A011540, A034710, A062034, A062035, A062036, A062382, A062037, A062384, A062040, A062041, A062043.

%K nonn,base,easy

%O 1,1

%A _Amarnath Murthy_, Jun 28 2001

%E Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jul 06 2001

%E More terms from _Harvey P. Dale_, Nov 25 2010

%E Offset corrected by _Mohammed Yaseen_, Sep 12 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)