Fermat primes and tangent numbers
The nth Fermat number is defined by
Pierre Fermat conjectured that the F(n) were prime for alln, and they are forn = 0, 1, 2, 3, and 4, but Leonard Euler factoredF(5), showing that it is not prime.
Tangent numbersThenth tangent number is defined by the Taylor series for tangent:
Another way to put it is that the exponential generating function forT(n) is tan(z).
Fermat primes and tangent numbersHere'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 ifF(n) does not divideT(F(n) - 2).
That is, thenth 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
The post Fermat primes and tangent numbers first appeared on John D. Cook.