cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A062036 Positive numbers whose product of digits is four times their sum.

This page as a plain text file.
%I A062036 #18 Aug 02 2022 09:20:22
%S A062036 88,189,198,246,264,426,462,624,642,819,891,918,981,1247,1274,1344,
%T A062036 1427,1434,1443,1472,1724,1742,2147,2174,2226,2262,2417,2471,2622,
%U A062036 2714,2741,3144,3414,3441,4127,4134,4143,4172,4217,4271,4314,4341,4413,4431
%N A062036 Positive numbers whose product of digits is four times their sum.
%H A062036 Harry J. Smith, <a href="/A062036/b062036.txt">Table of n, a(n) for n = 1..500</a>
%e A062036 1344 belongs to the sequence as (1*3*4*4)/(1+3+4+4) = 48/12 = 4.
%t A062036 p4sQ[n_]:=Module[{idn=IntegerDigits[n]},Times@@idn/Total[idn]==4]; Select[Range[5000],p4sQ]  (* _Harvey P. Dale_, Apr 26 2011 *)
%o A062036 (PARI) isok(n) = my(d=digits(n)); vecprod(d)==4*vecsum(d) \\ _Mohammed Yaseen_, Jul 31 2022
%o A062036 (Python)
%o A062036 from math import prod
%o A062036 def ok(n): d = list(map(int, str(n))); return prod(d) == 4*sum(d)
%o A062036 print([k for k in range(1, 5000) if ok(k)]) # _Michael S. Branicky_, Jul 31 2022
%Y A062036 Cf. A011540, A034710, A062034, A062035, A062382, A062037, A062384, A062040, A062041, A062043, A062045.
%K A062036 nonn,base,easy
%O A062036 1,1
%A A062036 _Amarnath Murthy_, Jun 27 2001
%E A062036 More terms from Larry Reeves (larryr(AT)acm.org), Jul 06 2001
%E A062036 Offset corrected by _Mohammed Yaseen_, Jul 31 2022