Infer geometric sequences Haskell has this neat(-looking) feature where you can give it three numbers and it can infer an arithmetic sequence from them. For example, [1, 3..27] is equivalent to [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27].

That's cool and all but arithmetic sequences are fairly limiting. Addition, pfft. Multiplication's where it's at. Wouldn't it be cooler if it did geometric sequences like [1, 3..27] returning [1, 3, 9, 27]?

Challenge

Write a program/function that takes three positive integers a, b, and c and outputs [a, b, b × (b ÷ a), b × (b ÷ a)2, ..., x] where x is the greatest integer ≤ c that can be represented as b × (b ÷ a)n where n is a positive integer.

That is, the output should be r, such that:

r0 = a
r1 = b
rn = b × (b ÷ a)n-1
rlast = greatest integer ≤ c that can be represented as b × (b ÷ a)n
         where n is a positive integer

Specifications


Standard I/O rules apply.
Standard loopholes are forbidden.
b will always be divisible by a.
a &lt; b ≤ c
This challenge is not about finding the shortest approach in all languages, rather, it is about finding the shortest approach in each language.
Your code will be scored in bytes, usually in the encoding UTF-8, unless specified otherwise.
Built-in functions (Mathematica might have one :P) that compute this sequence are allowed but including a solution that doesn't rely on a built-in is encouraged.
Explanations, even for "practical" languages, are encouraged.


Test cases

a   b   c     r

1   2   11    [1, 2, 4, 8]
2   6   100   [2, 6, 18, 54]
3   12  57    [3, 12, 48]
4   20  253   [4, 20, 100]
5   25  625   [5, 25, 125, 625]
6   42  42    [6, 42]

In a few better formats:

1 2 11
2 6 100
3 12 57
4 20 253
5 25 625
6 42 42

1, 2, 11
2, 6, 100
3, 12, 57
4, 20, 253
5, 25, 625
6, 42, 42
Husk, 8 bytes

~↑≤Ṡ¡o//


Input is in order b, c, a.
Try it online!

Explanation

~↑≤Ṡ¡o//  Implicit inputs.
       /  a/b as exact rational number.
     o/   Divide by a/b (so multiply by b/a).
    ¡     Iterate that function
   Ṡ      on a. Result is the infinite list [a, b, b^2/a, b^3/a^2, ..
 ↑        Take elements from it while
~ ≤       they are at most c.


The control flow in this program is a bit hard to follow.
First, b is fed to the rightmost /, producing a function /b that divides by b.
Next, ~ splits the remaining program into three parts: ~(↑)(≤)(Ṡ¡o//b).
This feeds c to ≤ and a to Ṡ¡o//b, and combines the results with ↑.
The result of ≤c is a function that checks if its argument is at most c, and ↑≤c takes the longest prefix of elements for which this holds.

It remains to show how (Ṡ¡o//b)a evaluates to the desired infinite list.
The part in parentheses is split into Ṡ(¡)(o//b).
Then Ṡ feeds a to o//b, feeds the result to ¡, and then gives a to its second argument.
The expression (o//b)a gives a function that takes a number and divides it by a/b, and ¡ iterates this function on its second argument, which is a.

Here is a series of transformations that visualize the explanation:

  (~↑≤Ṡ¡o//) b c a
= (~↑≤Ṡ¡o/(/b)) c a
= ~(↑)(≤)(Ṡ¡o/(/b)) c a
= ↑(≤c)((Ṡ¡o/(/b)) a)
= ↑(≤c)(Ṡ(¡)(o/(/b)) a)
= ↑(≤c)(¡(o/(/b)a) a)
= ↑(≤c)(¡(/(/ba))a)
Last line in English: takeWhile (atMost c) (iterate (divideBy (divideBy b a)) a)


Alternative solution using explicit variables in order a, b, c:

↑≤⁰¡*/⁵²