%I #4 Apr 05 2017 07:51:05
%S 6,5,4,3,2,1,0,47,40,33,26,19,12,5,46,39,32,25,18,11,4,45,38,31,24,17,
%T 10,3,44,37,30,23,16,9,2,43,36,29,22,15,8,1,42,35,28,21,14,7,0,341,
%U 292,243,194,145,96,47,334,285,236,187,138,89,40,327,278,229,180
%N Write in base k, complement, reverse. Case k = 7.
%e a(14) = 46 because 14 in base 7 is 20, its complement in base 7 is 46 and the digit reverse is 64 that is 46 in base 10.
%p P:=proc(q,h) local a,b,k,n; print(h-1); for n from 1 to q do a:=convert(n,base,h); b:=0;
%p for k from 1 to nops(a) do a[k]:=h-1-a[k]; b:=h*b+a[k]; od; print(b); od; end: P(10^2,7);
%Y Cf. A036044, A267193, A284806.
%K nonn,base,easy
%O 0,1
%A _Paolo P. Lava_, Apr 03 2017