login
A030106
Base 7 reversal of n (written in base 10).
6
0, 1, 2, 3, 4, 5, 6, 1, 8, 15, 22, 29, 36, 43, 2, 9, 16, 23, 30, 37, 44, 3, 10, 17, 24, 31, 38, 45, 4, 11, 18, 25, 32, 39, 46, 5, 12, 19, 26, 33, 40, 47, 6, 13, 20, 27, 34, 41, 48, 1, 50, 99, 148, 197, 246, 295, 8, 57, 106, 155, 204, 253, 302, 15, 64, 113, 162, 211, 260, 309, 22, 71
OFFSET
0,3
LINKS
MAPLE
f:= proc(n) local L, k;
L:= convert(n, base, 7);
add(L[-i]*7^(i-1), i=1..nops(L))
end proc:
map(f, [$0..100]); # Robert Israel, May 19 2020
MATHEMATICA
Table[FromDigits[Reverse[IntegerDigits[n, 7]], 7], {n, 0, 80}] (* Harvey P. Dale, Sep 17 2013 *)
PROG
(PARI) a(n, b=7)=subst(Polrev(base(n, b)), x, b) /* where */
base(n, b)={my(a=[n%b]); while(0<n\=b, a=concat(n%b, a)); a} \\ M. F. Hasler, Nov 04 2011
CROSSREFS
KEYWORD
nonn,base,look
STATUS
approved