%I #22 Sep 08 2022 08:44:51
%S 1,4,9,12,33,36,73,76,97,100,265,268,289,292,585,588,609,612,777,780,
%T 801,804,2121,2124,2145,2148,2313,2316,2337,2340,4681,4684,4705,4708,
%U 4873,4876,4897,4900,6217,6220,6241,6244,6409
%N Numbers whose set of base-8 digits is {1,4}.
%H Vincenzo Librandi, <a href="/A032820/b032820.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Ar#2-automatic">Index entries for 2-automatic sequences</a>.
%F a(1)=1, a(2)=4; a(n) = 8*a(floor(n/2))+1 for n odd, otherwise a(n) = 8*a(floor((n-1)/2))+4. - _Bruno Berselli_, May 28 2012
%t Flatten[Table[FromDigits[#,8]&/@Tuples[{1,4},n],{n,9}]] (* _Vincenzo Librandi_, May 28 2012 *)
%o (Magma) [n: n in [1..7000] | Set(IntegerToSequence(n, 8)) subset {1, 4}]; // _Vincenzo Librandi_, May 28 2012
%o (Maxima) a[1]:1$ a[2]:4$ a[n]:= if oddp(n) then 8*a[floor(n/2)]+1 else 8*a[floor((n-1)/2)]+4$ makelist(a[n],n,1,43); /* _Bruno Berselli_, May 28 2012 */
%K nonn,base,easy
%O 1,2
%A _Clark Kimberling_