I've been searching numerically, and whenever a positive definite binary quadratic form can primitively represent an integer $n>1$ and $n^3$, it turns out to be equivalent to the identity form in that class group.
Is there some elementary way to see that this is only possible for identity forms?
Here is what initially gave me hope that it could be possible with other forms.
For any binary quadratic form $A x^2 + B xy + C y^2$, if it can represent integers $r$, $s$, $t$ then it can also represent $rst$.
This can be seen as follows:
For any form with coefficients $(A,B,C)$, in the class group its inverse is $(A,-B,C)$.
Both a form and its inverse can represent the same numbers (if $(x,y)$ with the former, use $(x,-y)$ with the later).
If a form can represent $r$ with $(x_1,y_1)$, and $s$ with $(x_2,y_2)$ then the identity form can represent $rs$ with some integers $(u,v)$ due to form composition:
$$ \begin{aligned} rs &= (A x_1^2 + B x_1 y_1 + C y_1^2)(A x_2^2 + B x_2 y_2 + C y_2^2) \\ &= (A x_1^2 + B x_1 y_1 + C y_1^2)(A x_2^2 - B x_2 (-y_2) + C (-y_2)^2) \\ &= I(u,v) \\ \end{aligned} $$
- Futhermore, if the form can represent $t$ with $(x_3,y_3)$, then it can represent $rst$ by some integers $(x_4,y_4)$ due to form composition.
$$rst = I(u,v)(A x_3^2 + B x_3 y_3 + C y_3^2) = (A x_4^2 + B x_4 y_4 + C y_4^2)$$
It is definitely possible to primitively represent cubes, for example
a) 2 x^2 - xy + 6 y^2 = 3^3 with x=3,y=-1
b) 2 x^2 - xy + 6 y^2 = 8^3 with x=2,y=-9
But in example 'a', it is not possible for that form to represent 3. While in example 'b', the form can represent 8, but not primitively (x=2,y=0).
This seems to be the case for any form not equivalent to an identity form.
While for an identity form, I've been able to find a lot of examples that work.
x^2 + xy + 12 y^2 = 18 with x=2, y=1, gcd(x,y)=1
x^2 + xy + 12 y^2 = 18^3 with x=-76, y=7, gcd(x,y)=1
x^2 + xy + 12 y^2 = 118 with x=2, y=3, gcd(x,y)=1
x^2 + xy + 12 y^2 = 118^3 with x=964, y=207, gcd(x,y)=1
x^2 + xy + 12 y^2 = 63 with x=3, y=2, gcd(x,y)=1
x^2 + xy + 12 y^2 = 63^3 with x=-501, y=2, gcd(x,y)=1
Can one prove that if a form can primitively represent $n$ and $n^3$, that is must be equivalent to the identity form?
UPDATE:
A related question On products of ternary quadratic forms $\prod_{i=1}^3 (ax_i^2+by_i^2+cz_i^2) = ax_0^2+by_0^2+cz_0^2$ shows a possible solution for any form with B=0 (all that is left is to analyze if the result is a primitive representation). Such forms are in the same equivalence class as its inverse in the class group, and are called "ambiguous forms".
Below Will Jagy gave an explicit solution for an ambiguous form which is not equivalent to the identity form, showing that the result can be a primitive representation.
The connection to what I tried is that the identity is always an ambiguous form. So that likely refines the question to:
If a form can primitively represents $n$ and $n^3$, is the form necessarily an ambiguous form?
