%I #16 Sep 08 2022 08:44:51
%S 1,4,7,10,25,28,43,46,61,64,151,154,169,172,259,262,277,280,367,370,
%T 385,388,907,910,925,928,1015,1018,1033,1036,1555,1558,1573,1576,1663,
%U 1666,1681,1684,2203,2206,2221,2224,2311,2314,2329
%N Numbers whose set of base-6 digits is {1,4}.
%H Vincenzo Librandi, <a href="/A032818/b032818.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Ar#6-automatic">Index entries for 6-automatic sequences</a>.
%F a(1)=1, a(2)=4; a(n) = 6*a(floor(n/2))+1 for n odd, otherwise a(n) = 6*a(floor((n-1)/2))+4. - _Bruno Berselli_, May 28 2012
%t Flatten[Table[FromDigits[#,6]&/@Tuples[{1,4},n],{n,5}]] (* _Vincenzo Librandi_, May 27 2012 *)
%o (Magma) [n: n in [1..3000] | Set(IntegerToSequence(n, 6)) subset {1, 4}];// _Vincenzo Librandi_, May 27 2012
%o (Maxima) a[1]:1$ a[2]:4$ a[n]:= if oddp(n) then 6*a[floor(n/2)]+1 else 6*a[floor((n-1)/2)]+4$ makelist(a[n],n,1,45); /* _Bruno Berselli_, May 28 2012 */
%K nonn,base,easy
%O 1,2
%A _Clark Kimberling_
|