login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A028373
Numbers that have only the straight digits {1, 4, 7}.
12
1, 4, 7, 11, 14, 17, 41, 44, 47, 71, 74, 77, 111, 114, 117, 141, 144, 147, 171, 174, 177, 411, 414, 417, 441, 444, 447, 471, 474, 477, 711, 714, 717, 741, 744, 747, 771, 774, 777, 1111, 1114, 1117, 1141, 1144, 1147, 1171, 1174, 1177, 1411, 1414, 1417, 1441
OFFSET
1,2
LINKS
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
Cf. A028374, the curved sequence.
Cf. A079651 prime numbers using only the straight digits 1,4,7.
Sequence in context: A184623 A184581 A310725 * A310726 A310727 A190769
KEYWORD
easy,nonn,base
AUTHOR
Greg Heil (gheil(AT)scn.org), Dec 11 1999
STATUS
approved