%I #20 Sep 08 2022 08:44:51
%S 1,4,13,16,49,52,157,160,193,196,589,592,625,628,1885,1888,1921,1924,
%T 2317,2320,2353,2356,7069,7072,7105,7108,7501,7504,7537,7540,22621,
%U 22624,22657,22660,23053,23056,23089,23092,27805,27808
%N Numbers whose set of base-12 digits is {1,4}.
%H Vincenzo Librandi, <a href="/A032824/b032824.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Ar#12-automatic">Index entries for 12-automatic sequences</a>.
%F a(1)=1, a(2)=4; a(n) = 12*a(floor(n/2))+1 for n odd, otherwise a(n) = 12*a(floor((n-1)/2))+4. - _Bruno Berselli_, May 28 2012
%t Select[Range[30000],MemberQ[{{1},{4},{1,4}}, Union[ IntegerDigits [#,12]]]&] (* _Harvey P. Dale_, Apr 02 2011 *)
%t Flatten[Table[FromDigits[#,12]&/@Tuples[{1,4},n],{n,5}]] (* _Vincenzo Librandi_, May 28 2012 *)
%o (Magma) [n: n in [1..28000] | Set(IntegerToSequence(n, 12)) subset {1, 4}]; // _Vincenzo Librandi_, May 28 2012
%o (Maxima) a[1]:1$ a[2]:4$ a[n]:= if oddp(n) then 12*a[floor(n/2)]+1 else 12*a[floor((n-1)/2)]+4$ makelist(a[n],n,1,40); /* _Bruno Berselli_, May 28 2012 */
%K nonn,base,easy
%O 1,2
%A _Clark Kimberling_