OFFSET
1,1
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..500
EXAMPLE
1344 belongs to the sequence as (1*3*4*4)/(1+3+4+4) = 48/12 = 4.
MATHEMATICA
p4sQ[n_]:=Module[{idn=IntegerDigits[n]}, Times@@idn/Total[idn]==4]; Select[Range[5000], p4sQ] (* Harvey P. Dale, Apr 26 2011 *)
PROG
(PARI) isok(n) = my(d=digits(n)); vecprod(d)==4*vecsum(d) \\ Mohammed Yaseen, Jul 31 2022
(Python)
from math import prod
def ok(n): d = list(map(int, str(n))); return prod(d) == 4*sum(d)
print([k for k in range(1, 5000) if ok(k)]) # Michael S. Branicky, Jul 31 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amarnath Murthy, Jun 27 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Jul 06 2001
Offset corrected by Mohammed Yaseen, Jul 31 2022
STATUS
approved