Problem 58018. List the Fermi-Dirac primes
The Fermi-Dirac “primes” are prime powers with exponents that are powers of 2. The first nine terms of the sequence are 2, 3, 4, 5, 7, 9, 11, 13, and 16. Six of the terms are primes; two are squares of primes; and the remaining term, 16, is
.
The name comes from an analogy with particle physics because every number can be written as the product of a unique subset of the Fermi-Dirac primes. For example,
.
Write a function analogous to primes(n) that lists the Fermi-Dirac primes less than or equal to n.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers11
Suggested Problems
-
992 Solvers
-
Back to basics 25 - Valid variable names
336 Solvers
-
Arrange vector in ascending order
812 Solvers
-
Create a vector whose elements depend on the previous element
776 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1251 Solvers
More from this Author319
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!