A256296 Apply the transformation 0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 0 to the digits of n written in base 6, then convert back to base 10.
1, 2, 3, 4, 5, 0, 13, 14, 15, 16, 17, 12, 19, 20, 21, 22, 23, 18, 25, 26, 27, 28, 29, 24, 31, 32, 33, 34, 35, 30, 1, 2, 3, 4, 5, 0, 79, 80, 81, 82, 83, 78, 85, 86, 87, 88, 89, 84, 91, 92, 93, 94, 95, 90, 97, 98, 99, 100, 101, 96
Offset: 0
Examples
a(6) = 13 because 6 = 10[6] becomes 21[6] = 13. a(35) = 0 because 35 = 55[6] becomes 00[6] = 0.
Programs
-
PARI
A256296(n,b=6)=!n+apply(t->(t+1)%b,n=digits(n,b))*vector(#n,i,b^(#n-i))~
Comments