OFFSET
1,2
EXAMPLE
10 is a term because "10" ends in "0" = 1*0;
118 is a term because "118" ends in "8" = 1*1*8;
236 is a term because "236" ends in "36" = 2*3*6; etc.
MATHEMATICA
q[n_] := Module[{d = IntegerDigits[n], p, dp, ndp}, p = Times @@ d; dp = IntegerDigits[p]; ndp = Length[dp]; dp == d[[-ndp ;; -1]]]; Select[Range[400], q] (* Amiram Eldar, Mar 17 2022 *)
PROG
(Python)
from math import prod
def ok(n): s = str(n); return s.endswith(str(prod(map(int, s))))
print([k for k in range(1, 401) if ok(k)]) # Michael S. Branicky, Mar 17 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Mar 17 2022
STATUS
approved