To my knowledge, Fermat primes, i.e. primes of the form $2^{2^n}+1$ were the first to play a role in a mathematical result, namely in the characterization of constructible regular n-gons. Gauss discovered the constructability of the regular Heptadecagon (http://en.wikipedia.org/wiki/Heptadecagonhttp://en.wikipedia.org/wiki/Heptadecagon) in 1796.
Not much later, in 1805, Sophie Germain proved Fermat's conjecture for primes $p$ for which $2p+1$ is also prime.
My Question is: Have there been any mathematical results, that are not related to the properties of prime numbers and, were found prior to Gauss' discovery of the constructability of the regular Heptadecagon, that were formulated via a proper subset of the prime numbers, that was characterized via a parameterized expression.