OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
L[1]:= {3}: G[1]:= {$4..9}:
for n from 2 to 3 do L[n]:= map(t -> seq(10*t+j, j=3..9), L[n-1]) union map(t -> 10*t+3, G[n-1]);
G[n]:= map(t -> seq(10*t+j, j=4..9), G[n-1])
od:
seq(op(sort(convert(L[n], list))), n=1..3); # Robert Israel, Mar 27 2017
MATHEMATICA
With[{k = 3}, Select[Range@ 388, And[Total@ Take[#, k] == 0, #[[k + 1]] > 0] &@ RotateRight@ DigitCount@ # &]] (* Michael De Vlieger, Mar 20 2017 *) (* or *)
Select[Range[10000], Min[IntegerDigits[#]] == 3 &] (* faster, simpler, Giovanni Resta, Mar 22 2017 *)
PROG
(Magma) [n: n in [1..100000] | Minimum(Setseq(Set(Sort(&cat[Intseq(n)])))) eq 3]
(PARI) isok(n) = vecmin(digits(n)) == 3; \\ Michel Marcus, Mar 25 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Mar 19 2017
STATUS
approved