[go: up one dir, main page]

login
A030107
Base 8 reversal of n (written in base 10).
8
0, 1, 2, 3, 4, 5, 6, 7, 1, 9, 17, 25, 33, 41, 49, 57, 2, 10, 18, 26, 34, 42, 50, 58, 3, 11, 19, 27, 35, 43, 51, 59, 4, 12, 20, 28, 36, 44, 52, 60, 5, 13, 21, 29, 37, 45, 53, 61, 6, 14, 22, 30, 38, 46, 54, 62, 7, 15, 23, 31, 39, 47, 55, 63, 1, 65, 129, 193, 257, 321, 385, 449, 9, 73, 137
OFFSET
0,3
LINKS
MATHEMATICA
Table[FromDigits[Reverse[IntegerDigits[n, 8]], 8], {n, 0, 80}] (* Harvey P. Dale, Jun 04 2021 *)
PROG
(PARI) a(n, b=8)=subst(Polrev(base(n, b)), x, b) /* where */
base(n, b)={my(a=[n%b]); while(n\=b, a=concat(n%b, a)); a} \\ M. F. Hasler, Nov 04 2011
CROSSREFS
KEYWORD
nonn,base,look
STATUS
approved