OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
MAPLE
a:= proc(n) local d, i, m, r; m:=n; r:=0;
for i from 0 while m>0 do
d:= irem(m, 3, 'm');
if d=0 then d:=3; m:=m-1 fi;
r:= r+10^i*[1, 4, 7][d]
od: r
end:
seq(a(n), n=1..100); # Alois P. Heinz, May 25 2014
MATHEMATICA
f[n_] := Block[{id = IntegerDigits[n], straight = {1, 4, 7}}, If[ Union[ Join[id, straight]] == straight, True, False]]; Select[ Range[0, 1446], f[ # ] & ]
FromDigits/@Flatten[Table[Tuples[{1, 4, 7}, n], {n, 4}], 1] (* Harvey P. Dale, Jul 25 2015 *)
PROG
(PARI) is(n)=my(t); while(n, t=n%10; if(t!=1&&t!=4&&t!=7, return(0)); n\=10); !!t \\ Charles R Greathouse IV, Sep 25 2012
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Greg Heil (gheil(AT)scn.org), Dec 11 1999
STATUS
approved