login
Numbers whose set of base-15 digits is {1,4}.
1

%I #19 Sep 08 2022 08:44:51

%S 1,4,16,19,61,64,241,244,286,289,916,919,961,964,3616,3619,3661,3664,

%T 4291,4294,4336,4339,13741,13744,13786,13789,14416,14419,14461,14464,

%U 54241,54244,54286,54289,54916,54919,54961,54964

%N Numbers whose set of base-15 digits is {1,4}.

%H Vincenzo Librandi, <a href="/A032827/b032827.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Ar#15-automatic">Index entries for 15-automatic sequences</a>.

%F a(1)=1, a(2)=4; a(n) = 15*a(floor(n/2))+1 for n odd, otherwise a(n) = 15*a(floor((n-1)/2))+4. - _Bruno Berselli_, May 28 2012

%t Flatten[Table[FromDigits[#,15]&/@Tuples[{1,4},n],{n,5}]] (* _Vincenzo Librandi_, May 28 2012 *)

%o (Magma) [n: n in [1..60000] | Set(IntegerToSequence(n, 15)) subset {1, 4}]; // _Vincenzo Librandi_, May 28 2012

%o (Maxima) a[1]:1$ a[2]:4$ a[n]:= if oddp(n) then 15*a[floor(n/2)]+1 else 15*a[floor((n-1)/2)]+4$ makelist(a[n],n,1,38); /* _Bruno Berselli_, May 28 2012 */

%K nonn,base,easy

%O 1,2

%A _Clark Kimberling_