A255805 Numbers with no zeros in base-8 representation.
1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Wikipedia, Octal
- Index entries for 2-automatic sequences.
Crossrefs
Programs
-
Haskell
a255805 n = a255805_list !! (n-1) a255805_list = iterate f 1 where f x = 1 + if r < 7 then x else 8 * f x' where (x', r) = divMod x 8
-
Mathematica
Select[Range[100],DigitCount[#,8,0]==0&] (* Harvey P. Dale, Jun 08 2015 *)
-
PARI
isok(m) = vecmin(digits(m,8)) > 0; \\ Michel Marcus, Jan 23 2022
-
Python
def ok(n): return '0' not in oct(n)[2:] print([k for k in range(85) if ok(k)]) # Michael S. Branicky, Jan 23 2022
-
Python
from sympy import integer_log def A255805(n): m = integer_log(k:=6*n+1,7)[0] return sum(1+(k-7**m)//(6*7**j)%7<<3*j for j in range(m)) # Chai Wah Wu, Jun 28 2025
Comments