Perl Weekly Challenge 169: Brilliant Numbers and Achilles Numbers
These are some answers to the Week 169 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a couple of days from now (on June 19, 2022 at 23:59). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Task 1: Brilliant Numbers
Write a script to generate first 20 Brilliant Numbers.
Brilliant numbers are numbers with two prime factors of the same length.
The number should have exactly two prime factors, i.e. it’s the product of two primes of the same length.
For example:
24287 = 149 x 163
24289 = 107 x 227
Therefore 24287 and 24289 are 2-brilliant numbers.
