A255808 Numbers with no zeros in base-9 representation.
1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Index entries for 3-automatic sequences.
Crossrefs
Programs
-
Haskell
a255808 n = a255808_list !! (n-1) a255808_list = iterate f 1 where f x = 1 + if r < 8 then x else 9 * f x' where (x', r) = divMod x 9
-
Mathematica
Select[Range[100],DigitCount[#,9,0]==0&] (* or *) With[{upto=100}, Complement[ Range[upto],9*Range[Floor[upto/9]]]] (* Harvey P. Dale, May 29 2019 *)
-
PARI
isok(n) = vecmin(digits(n, 9)) != 0; \\ Michel Marcus, Jun 29 2019
-
Python
def A255808(n): m = ((k:=7*n+1).bit_length()-1)//3 return sum((1+((k-(1<<3*m))//(7<<3*j)&7))*9**j for j in range(m)) # Chai Wah Wu, Jun 28 2025
Comments