OFFSET
0,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
EXAMPLE
a(16) = 61 because 16 in base 8 is 20, its complement in base 8 is 57 and the digit reverse is 75 that is 61 in base 10.
MAPLE
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;
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, 8);
MATHEMATICA
With[{k = 8}, Array[FromDigits[Reverse[k - IntegerDigits[#, k] - 1], k] &, 69, 0]] (* Michael De Vlieger, Feb 04 2022 *)
PROG
(Python)
def A284807(n): return -int((s:=oct(n)[-1:1:-1]), 8)-1+8**len(s) # Chai Wah Wu, Feb 04 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Apr 03 2017
EXTENSIONS
Offset corrected by Chai Wah Wu, Feb 04 2022
STATUS
approved