Consider a base n rational number α.β and it's reverse form β.α such that their product is an integer.
For example, in base ten: (3.5)*(5.3)= 18.55, which is NOT an integer.
Consider all positive integer bases n ≤ 36 and determine all valid triplets (α, β, n) of positive integers for which the product of (α.β)base n and (β.α)base n is an integer.
The solutions generated by Charlie's program suggest there are two sets of solutions, those that have one of A and B equal 0 and those that have both A and B nonzero.
I'll work with the first set, those with a zero digit. Let B=0. Then we effectively want pairs (A,N) where A^2/N is an integer. For some given N, decompose it into F*G^2 where F is a squarefree integer. G must be at least 2. Otherwise we are forced to take A=N to have A^2/N be an integer but A is strictly less than N.
Then the smallest A is F*G. From this we have A^2/N = (F*G)^2/(F*G^2) = F. Larger values of A can by multiplied by any value H where 1<=H<=G-1. Which gives a general (A,N) as A=F*G*H and N=F*G^2, subject to the restrictions F is squarefree, G>=2, and 1<=H<=G-1.
An example N=18.
18 = 2*3^2, then F=2, G=3 and 1<=H<=2. Which gives A=2*3*1=6 and A=2*3*2=12 (12=digit C in base 18) as valid A. This agrees with Charlie's program output at N=18.
The following small UBASIC program calculates (A,N) pairs but without converting A to a base N digit:
5 print=print+"output.txt"
10 for N=2 to 36
20 G=floor(sqrt(N))
30 F=N\(G^2)
40 if res=0 then 100
50 G=G-1:goto 30
100 for H=1 to G-1
110 print "(";F*G*H;F*G^2;")";
120 next H
130 print
140 next N
150 print=print
200 end
Which has an output of:
( 2 4 )
( 4 8 )
( 3 9 )( 6 9 )
( 6 12 )
( 4 16 )( 8 16 )( 12 16 )
( 6 18 )( 12 18 )
( 10 20 )
( 12 24 )
( 5 25 )( 10 25 )( 15 25 )( 20 25 )
( 9 27 )( 18 27 )
( 14 28 )
( 8 32 )( 16 32 )( 24 32 )
( 6 36 )( 12 36 )( 18 36 )( 24 36 )( 30 36 )
These pairs do correspond to each solution with a zero digit that Charlie computed directly.
Edited on April 15, 2022, 5:58 pm