A256299 Apply the transformation 0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 0 to the digits of n written in base 9, then convert back to base 10.
1, 2, 3, 4, 5, 6, 7, 8, 0, 19, 20, 21, 22, 23, 24, 25, 26, 18, 28, 29, 30, 31, 32, 33, 34, 35, 27, 37, 38, 39, 40, 41, 42, 43, 44, 36, 46, 47, 48, 49, 50, 51, 52, 53, 45, 55, 56, 57, 58, 59, 60, 61, 62, 54, 64, 65, 66, 67, 68, 69
Offset: 0
Examples
a(9) = 19 because 9 = 10[9] becomes 21[9] = 19. a(80) = 0 because 80 = 88[9] becomes 00[9] = 0.
Programs
-
PARI
A256299(n,b=9)=!n+apply(t->(t+1)%b,n=digits(n,b))*vector(#n,i,b^(#n-i))~
Comments