A256298 Apply the transformation 0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 0 to the digits of n written in base 8, then convert back to base 10.
1, 2, 3, 4, 5, 6, 7, 0, 17, 18, 19, 20, 21, 22, 23, 16, 25, 26, 27, 28, 29, 30, 31, 24, 33, 34, 35, 36, 37, 38, 39, 32, 41, 42, 43, 44, 45, 46, 47, 40, 49, 50, 51, 52, 53, 54, 55, 48, 57, 58, 59, 60, 61, 62, 63, 56, 1, 2, 3, 4
Offset: 0
Examples
a(8) = 17 because 8 = 10[8] becomes 21[8] = 17. a(63) = 0 because 63 = 77[8] becomes 00[8] = 0.
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
Programs
-
Mathematica
Table[FromDigits[IntegerDigits[n,8]+1/.(8->0),8],{n,0,60}] (* Harvey P. Dale, Jan 28 2023 *)
-
PARI
A256298(n,b=8)=!n+apply(t->(t+1)%b,n=digits(n,b))*vector(#n,i,b^(#n-i))~
Comments