A037477 a(n) = Sum{d(i)*9^i: i=0,1,...,m}, where Sum{d(i)*8^i: i=0,1,...,m} is the base 8 representation of n.
0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, 81, 82, 83, 84, 85
Offset: 0
Examples
a(63) = 7*9+7 = 70 since 63 = 77[8], i.e., "77" when written in base 8; a(64) = 1*9^2 = 81 since 64 = 100[8]. - _M. F. Hasler_, Oct 05 2014
Links
- François Marques, Table of n, a(n) for n = 0..10000 (first 1000 terms from Clark Kimberling)
Crossrefs
Programs
-
Mathematica
Table[FromDigits[RealDigits[n, 8], 9], {n, 0, 100}] Select[Range[0,100],DigitCount[#,9,8]==0&] (* Harvey P. Dale, Aug 06 2024 *)
-
PARI
a(n) = vector(#n=digits(n,8),i,9^(#n-i))*n~ \\ M. F. Hasler, Oct 05 2014
-
PARI
a(n) = fromdigits(digits(n, 8), 9); \\ François Marques, Oct 15 2020
-
Python
def A037477(n): return int(oct(n)[2:],9) # Chai Wah Wu, Jan 27 2025
Formula
For n<64, a(n) = floor(9n/8) = A248375(n). - M. F. Hasler, Oct 05 2014
Extensions
Offset changed to 0 by Clark Kimberling, Aug 14 2012
Comments