login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A032923 Numbers whose set of base-16 digits is {1,3}. 1

%I #14 Oct 13 2023 11:49:56

%S 1,3,17,19,49,51,273,275,305,307,785,787,817,819,4369,4371,4401,4403,

%T 4881,4883,4913,4915,12561,12563,12593,12595,13073,13075,13105,13107,

%U 69905,69907,69937,69939,70417,70419,70449,70451

%N Numbers whose set of base-16 digits is {1,3}.

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

%t Flatten[Table[FromDigits[#,16]&/@Tuples[{1,3},n],{n,5}]] (* _Vincenzo Librandi_, Jun 03 2012 *)

%o (Magma) [n: n in [1..75000] | Set(IntegerToSequence(n, 16)) subset {1, 3}]; // _Vincenzo Librandi_, Jun 03 2012

%o (Python)

%o def A032923(n): return (int(bin(m:=n+1)[3:],16)<<1) + ((1<<(m.bit_length()-1<<2))-1)//15 # _Chai Wah Wu_, Oct 13 2023

%K nonn,base

%O 1,2

%A _Clark Kimberling_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 15:57 EDT 2024. Contains 371961 sequences. (Running on oeis4.)