%I #16 Sep 08 2022 08:46:19
%S 3,33,34,35,36,37,38,39,43,53,63,73,83,93,333,334,335,336,337,338,339,
%T 343,344,345,346,347,348,349,353,354,355,356,357,358,359,363,364,365,
%U 366,367,368,369,373,374,375,376,377,378,379,383,384,385,386,387,388
%N Numbers whose smallest decimal digit is 3.
%C Numbers n such that A054054(n) = 3.
%C Prime terms are in A106103.
%H Robert Israel, <a href="/A284064/b284064.txt">Table of n, a(n) for n = 1..10000</a>
%p L[1]:= {3}: G[1]:= {$4..9}:
%p 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]);
%p G[n]:= map(t -> seq(10*t+j,j=4..9), G[n-1])
%p od:
%p seq(op(sort(convert(L[n],list))),n=1..3); # _Robert Israel_, Mar 27 2017
%t With[{k = 3}, Select[Range@ 388, And[Total@ Take[#, k] == 0, #[[k + 1]] > 0] &@ RotateRight@ DigitCount@ # &]] (* _Michael De Vlieger_, Mar 20 2017 *) (* or *)
%t Select[Range[10000], Min[IntegerDigits[#]] == 3 &] (* faster, simpler, _Giovanni Resta_, Mar 22 2017 *)
%o (Magma) [n: n in [1..100000] | Minimum(Setseq(Set(Sort(&cat[Intseq(n)])))) eq 3]
%o (PARI) isok(n) = vecmin(digits(n)) == 3; \\ _Michel Marcus_, Mar 25 2017
%Y Cf. Sequences of numbers whose smallest decimal digit is k (for k = 0..9): A011540 (k = 0), A284062 (k = 1), A284063 (k = 2), this sequence (k = 3), A284065 (k = 4), A284066 (k = 5), A284067 (k = 6), A284068 (k = 7), A284069 (k = 8), A002283 (k = 9).
%K nonn,base
%O 1,1
%A _Jaroslav Krizek_, Mar 19 2017