Minimal Rotate-Right-Double numbers in base n Task

For a given base \$n \ge 3\$, find the smallest positive integer \$m\$, when written in base \$n\$ and rotated right once, equals \$2m\$. The base-\$n\$ representation of \$m\$ cannot have leading zeroes.

The corresponding OEIS sequence is A087502, and its base-\$n\$ representation is A158877 (this one stops at \$n=11\$ because the answer for \$n=12\$ has a digit higher than 9). The OEIS page has some information about how to calculate the number:


  a(n) is the smallest integer of the form x*(n^d-1)/(2n-1) for integer x and d, where 1 &lt; x &lt; n and d &gt; 1. x is the last digit and d is the number of digits of a(n) in base n.
  
  Maple code:

A087502 := proc(n) local d, a; d := 1; a := n; while a&gt;=n do
  d := d+1; a := denom((2^d-1)/(2*n-1)); od;
return(max(2, a)*(n^d-1)/(2*n-1)); end proc;



You may output the result as a single integer or a list of base-10 or base-\$n\$ digits.

Examples and test cases

For \$ n = 3 \$, the answer is \$ m = 32 \$. \$ n = 4 \$ should give \$ m = 18 \$.

$$
m = 32_{10} = 1012_3 \rightarrow 2m = 64_{10} = 2101_3 \\
m = 18_{10} = 102_4 \rightarrow 2m = 36_{10} = 210_4
$$

n = 3
m = 32
m (base n) = 1012 or [1,0,1,2]
------------------------------
n = 4
m = 18
m (base n) = 102 or [1,0,2]
------------------------------
n = 10
m = 105263157894736842
m (base n) = 105263157894736842 or [1,0,5,2,6,3,1,5,7,8,9,4,7,3,6,8,4,2]
------------------------------
n = 33
m = 237184
m (base n) = 6jqd or [6,19,26,13]
------------------------------
n = 72
m = 340355112965862493
m (base n) = [6,39,19,45,58,65,32,52,26,13]


More I/O examples can be found on OEIS.

Scoring and winning criterion

Standard code-golf rules apply. Shortest solution in bytes wins.
Python 2, 77 76 70 bytes



f=lambda n,m=1,i=1:i&lt;m and f(n,m,i*n)or(m+m%n*i)/n-m*2and f(n,m+1)or m


Try it online!

Input: base n
Output: The smallest integer m satisfies the requirement.

Saved 6 bytes thanks to @Bubbler!

This is a brute-force search that starts at m = 1 and works its way up. Will run out of recursion limit if the actual solution is too large.

For each m, i keeps track of the current power of n, which is increased until i&gt;m.