login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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.
3

%I #8 Jan 28 2023 15:41:45

%S 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,

%T 34,35,36,37,38,39,32,41,42,43,44,45,46,47,40,49,50,51,52,53,54,55,48,

%U 57,58,59,60,61,62,63,56,1,2,3,4

%N 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.

%C Base 8 variant of A035327 (base 2) and A048379 (base 10). See A256293 - A256299 for bases 3 through 9, and A256308 for the variant where the result is not converted back to base 10.

%H Harvey P. Dale, <a href="/A256298/b256298.txt">Table of n, a(n) for n = 0..1000</a>

%e a(8) = 17 because 8 = 10[8] becomes 21[8] = 17.

%e a(63) = 0 because 63 = 77[8] becomes 00[8] = 0.

%t Table[FromDigits[IntegerDigits[n,8]+1/.(8->0),8],{n,0,60}] (* _Harvey P. Dale_, Jan 28 2023 *)

%o (PARI) A256298(n,b=8)=!n+apply(t->(t+1)%b,n=digits(n,b))*vector(#n,i,b^(#n-i))~

%K nonn,base,easy

%O 0,2

%A _M. F. Hasler_, Mar 22 2015