A023804 Xenodromes: all digits in base 9 are different.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75
Offset: 1
Examples
From _Michael De Vlieger_, Mar 24 2021: (Start) Numbers 0 through 8 are in the sequence because these are single digits in base 9 (nonary). 9 is in the sequence because 9 = "10" in base 9, and both nonary digits are distinct. 11 is in the sequence because, though in decimal the number repeats the digit 1, in base 9, 11 is written "13", with 2 distinct digits. (End)
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Extended b-file style table of all terms
Programs
-
Mathematica
Select[Range[0,80],Max[DigitCount[#,9]]==1&] (* Harvey P. Dale, Apr 26 2011 *) (* Second program: generate all terms (less than a second): *) Union@ Flatten@ Map[FromDigits[#, 9] & /@ Permutations[-1 + Position[Reverse@ #, 1][[All, 1]] ] &, IntegerDigits[Range[2, 2^9] - 1, 2] ] (* Michael De Vlieger, Mar 24 2021 *)
-
Python
from itertools import permutations A023804_list = sorted(set(int(''.join(d),9) for k in range(1,10) for d in permutations('012345678',k))) # Chai Wah Wu, Mar 25 2021
Comments