This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A037408 Numbers n such that the set of base-2 digits of n equals the set of base-3 digits of n. 2
 0, 1, 9, 10, 12, 27, 28, 30, 36, 37, 39, 81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 243, 244, 246, 247, 252, 253, 256, 270, 271, 273, 274, 279, 280, 282, 283, 324, 325, 327, 328, 333, 334, 336, 337, 351, 352, 354, 355, 360, 361, 363 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS From Alonso del Arte, Sep 10 2017: (Start) Neither binary repunits (A000225 without the initial 0) nor ternary repunits (A003462 without the initial 0) can be in this sequence, except for 1. The ternary repunits are numbers of the form (3^k - 1)/2. If k is odd, then (3^k - 1)/2 is even and therefore its binary representation ends in 0. If k is even, then (3^k - 1)/2 = 1 mod 4, which means its binary representation ends in 01. For much more obvious reasons, numbers with even just one 2 in their ternary representations (A074940) can't be in this sequence. (End) LINKS John Cerkan, Table of n, a(n) for n = 1..10000 EXAMPLE 9 is 1001 in binary and 100 in ternary. In both representations, the set of digits used is {0, 1}, hence 9 is in the sequence. 10 is 1010 in binary and 101 in ternary. In both representations, the set of digits used is {0, 1}, hence 10 is in the sequence. 11 is 1011 in binary and 102 in ternary. Clearly the binary representation can't include the digit 2, hence 11 is not in the sequence. MAPLE filter:= proc(n) local F;   F:= convert(convert(n, base, 3), set);   if has(F, 2) then return false fi;   evalb(F = convert(convert(n, base, 2), set)) end proc: select(filter, [\$0..1000]); # Robert Israel, Sep 18 2017 MATHEMATICA Select[Range[0, 399], Union[IntegerDigits[#, 2]] == Union[IntegerDigits[#, 3]] &] (* Vincenzo Librandi Sep 09 2017 *) PROG (PARI) isok(n) = vecsort(digits(n, 2), , 8) == vecsort(digits(n, 3), , 8); \\ Michel Marcus, Jan 05 2017 CROSSREFS Sequence in context: A078390 A216780 A279731 * A178680 A178679 A154766 Adjacent sequences:  A037405 A037406 A037407 * A037409 A037410 A037411 KEYWORD nonn,base AUTHOR EXTENSIONS Initial 0 added by Alonso del Arte, Sep 10 2017 STATUS approved

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

Last modified October 18 18:56 EDT 2019. Contains 328197 sequences. (Running on oeis4.)