OFFSET
1,1
COMMENTS
There are binomial(8,2) = 28 possible cases:
===============================
Bases | Numbers
----------|--------------------
b5 - b6 | 5, 114, 119, 120
b6 - b7 | 380, 384, 396
b7 - b8 | 730, 767, 1509
b8 - b9 | 4761
b4 - b6 | 8
b5 - b7 | 5
b6 - b8 | 100, 138
b4 - b7 | 6, 9
b5 - b8 | 5
b4 - b8 | 6, 10
b5 - b9 | 5
b4 - b9 | 6, 11
===============================
All the other 16 differences do not produce any number.
EXAMPLE
138 in base 6 is 350, in base 8 is 212 and 350 - 212 = 138.
4761 in base 8 is 11231, in base 9 is 6470 and 11231 - 6470 = 4761.
MAPLE
# Change the value of the parameters x, y for other differences
with(numtheory): P:=proc(q, x, y) local b1, b2, b1x, b2x, k, n;
for n from 1 to q do b1:=convert(n, base, x); b2:=convert(n, base, y);
b1x:=0; for k from nops(b1) by -1 to 1 do b1x:=10*b1x+b1[k]; od;
b2x:=0; for k from nops(b2) by -1 to 1 do b2x:=10*b2x+b2[k]; od;
if b1x-b2x=n then print(n); fi; od; end: P(5000, 8, 9);
MATHEMATICA
Select[Range[5000], Function[k, AnyTrue[Subtract @@ # & /@ Subsets[Map[FromDigits@ IntegerDigits[k, #] &, Range[2, 9]], {2}], # == k &]]] (* Michael De Vlieger, Feb 16 2018 *)
CROSSREFS
KEYWORD
nonn,base,easy,fini,full
AUTHOR
Paolo P. Lava, Feb 15 2018
STATUS
approved