Ideal class group of $\mathbb{Q}(\sqrt{-103})$
Solution 1:
As Jyrki Lahtonen notes in his comment, the norm of the principal ideal $I=\left(\frac{5+\sqrt{-103}}{2}\right)$ is $2^5$. It will therefore be enough to show that $I=P^5$ or $I=\bar{P}^5$, since 5 is prime and therefore will have to be the exact order of $P$ in the class group.
Now, $P$ and $\bar{P}$ are the only two ideals of $R=\mathbb{Z}\left[\frac{1+\sqrt{-103}}{2}\right]$ above 2. So we immediately know that $I=P^n\bar{P}^{5-n}$ for some $n$ between 0 and 5. But if $n$ is neither 0 nor 5, then $P\bar{P}=2R$ divides (i.e. contains) $I$, which immediately leads to a contradiction, since the generator is not divisible by 2 in $R$. So $I\not\subseteq 2R$, thus $n=0$ or 5 and we are done.
Solution 2:
People do not seem to like the quadratic form description of things, but it is the case that, if the discriminant $\Delta$ is negative, the group of binary quadratic forms of discriminant $\Delta$ is isomorphic to the class group of $\mathbb Q(\sqrt \Delta).$ The conditions for this are either $\Delta \equiv 1 \pmod 4$ is squarefree, or $\Delta$ is divisible by 4, $\Delta /4$ is squarefree, and $\Delta /4 \equiv 2,3 \pmod 4.$
For you, $\Delta = -103 \equiv 1 \pmod 4.$ The group of forms, under Gaussian composition, is cyclic of order 5:
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./classGroup
Absolute value of discriminant? 103 class number 5
( 1, 1, 26)
( 2, -1, 13)
( 2, 1, 13)
( 4, -3, 7)
( 4, 3, 7)
Each (A,B,C) refers to $A x^2 + B x y + C y^2.$
If you had a positive $\Delta,$ the congruence restrictions would be the same, we would need to also require that $\Delta$ not be a square, and we would be calculating the narrow class group. In this case, if there is an integral solution to $u^2 - \Delta v^2 = -4,$ narrow class group and class group agree, so we are done. If there is no solution to $u^2 - \Delta v^2 = -4,$ then the class group is the subgroup of squares of the narrow class group. Long story. In this latter case, you are, in effect, keeping the form that represents $1,$ but throwing out the (distinct in this case) form that represents $-1.$