Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find the nth Fermat number that is also a prime number
ResourceFunction["FermatPrime"][n] returns the nth Fermat number that is prime. |
Find the 3rd Fermat prime:
In[1]:= | ![]() |
Out[1]= | ![]() |
Find all known Fermat primes:
In[2]:= | ![]() |
Out[2]= | ![]() |
There are only 5 known Fermat primes. Therefore, FermatPrime[n] will return unevaluated for n>5:
In[3]:= | ![]() |
Out[3]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License