OFFSET
1,2
COMMENTS
I.e., the product of digits is 1, 4, or 9. - Franklin T. Adams-Watters, Sep 27 2016
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(d) local R, i;
R:= [1$d], seq([1$i, 4, 1$(d-1-i)], i=0..d-1), seq([1$i, 9, 1$(d-1-i)], i=0..d-1);
if d >= 2 then R:= R, op(combinat:-permute([1$(d-2), 2, 2])), op(combinat:-permute([1$(d-2), 3, 3])) fi;
op(sort(map(proc(L) local i; add(L[i]*10^(i-1), i=1..d) end proc, [R])))
end proc:
map(f, [$1..6]); # Robert Israel, Apr 09 2025
MATHEMATICA
Select[Range[12000], MemberQ[{1, 4, 9}, Times@@IntegerDigits[#]]&] (* Harvey P. Dale, Jan 22 2016 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jun 15 1999
STATUS
approved
