login
A256297
Apply the transformation 0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 0 to the digits of n written in base 7, then convert back to base 10.
2
1, 2, 3, 4, 5, 6, 0, 15, 16, 17, 18, 19, 20, 14, 22, 23, 24, 25, 26, 27, 21, 29, 30, 31, 32, 33, 34, 28, 36, 37, 38, 39, 40, 41, 35, 43, 44, 45, 46, 47, 48, 42, 1, 2, 3, 4, 5, 6, 0, 106, 107, 108, 109, 110, 111, 105, 113, 114, 115, 116
OFFSET
0,2
COMMENTS
Base 7 variant of A035327 (base 2) and A048379 (base 10). See A256293 - A256299 for bases 3 through 9, and A256307 for the variant where the result is not converted back to base 10.
EXAMPLE
a(7) = 15 because 7 = 10[7] becomes 21[7] = 15.
a(48) = 0 because 48 = 66[7] becomes 00[7] = 0.
PROG
(PARI) A256297(n, b=7)=!n+apply(t->(t+1)%b, n=digits(n, b))*vector(#n, i, b^(#n-i))~
CROSSREFS
Sequence in context: A356965 A004182 A265520 * A256307 A030998 A346691
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Mar 22 2015
STATUS
approved