|
|||
Golden PrimesA prime number is called a golden prime when it takes the following form: p = Φ2 – Φ – 1, where Φ = 2n, and n is a positive integer. Your task is to find golden primes. Write a program that calculates all values for n for which p is a golden prime less than a given value b. Input SpecificationThe input consists of a single positive integer b < 21000. Output SpecificationYour program must print to the standard output, on separate lines, all n values found. Sample Input
Output for Sample Input
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |