Fermat numbers
The nth Fermat number is defined by
Pierre Fermat conjectured that the F(n) were prime for all n, and they are for n = 0, 1, 2, 3, and 4, but Leonard Euler factored F(5), showing that it is not prime.
Tangent numbers
The nth tangent number is defined by the Taylor series for tangent:
Another way to put it is that the exponential generating function for T(n) is tan(z).
Fermat primes and tangent numbers
Here’s a remarkable connection between Fermat numbers and tangent numbers, discovered by Richard McIntosh as an undergraduate [1]:
F(n) is prime if and only if F(n) does not divide T(F(n) − 2).
That is, the nth Fermat number is prime if and only if it does not divide the (F(n) − 2)th tangent number.
We could duplicate Euler’s assessment that F(5) is not prime by showing that 4294967297 does not divide the 4294967295th tangent number. That doesn’t sound very practical, but it’s interesting.
Update: To see just how impractical the result in this post would be for testing whether a Fermat number is prime, I found an asymptotic estimate of tangent numbers on OEIS, and estimated that the 4294967295th tangent number has about 80 billion digits.
[1] Richard McIntosh. A Necessary and Sufficient Condition for the Primality of Fermat Numbers. The American Mathematical Monthly, Vol. 90, No. 2 (Feb., 1983), pp. 98–99
Interesting case of a solution to a problem being drastically worse!