%I #4 Mar 25 2015 02:00:59
%S 1,2,3,0,9,10,11,8,13,14,15,12,1,2,3,0,37,38,39,36,41,42,43,40,45,46,
%T 47,44,33,34,35,32,53,54,55,52,57,58,59,56,61,62,63,60,49,50,51,48,5,
%U 6,7,4,9,10,11,8,13,14,15,12
%N Apply the transformation 0 -> 1 -> 2 -> 3 -> 0 to the digits of n written in base 4, then convert back to base 10.
%C Base 4 variant of A035327 (base 2) and A048379 (base 10). See A256293 - A256299 for bases 3 through 9, and A256304 for the variant where the result is not converted back to base 10.
%e a(4) = 7 because 4 = 10[4] becomes 21[4] = 9.
%e a(15) = 0 because 15 = 33[4] becomes 00[4] = 0.
%o (PARI) A256294(n,b=4)=!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
|