RosettaCodeData/Task/Brilliant-numbers/00-TASK.txt
2025-02-27 18:35:13 -05:00

27 lines
1.2 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'''Brilliant numbers''' are a subset of [[Semiprime|semiprime]] numbers. Specifically, they are numbers that are the product of exactly two prime numbers '''that both have the same number of digits when expressed in base 10'''.
''Brilliant numbers are useful in cryptography and when testing prime factoring algorithms.''
;E.G.
* '''3 × 3''' (9) is a brilliant number.
* '''2 × 7''' (14) is a brilliant number.
* '''113 × 691''' (78083) is a brilliant number.
* '''2 × 31''' (62) is semiprime, but is '''not''' a brilliant number (different number of digits in the two factors).
;Task
* Find and display the first 100 brilliant numbers.
* For the orders of magnitude 1 through 6, find and show the first brilliant number greater than or equal to the order of magnitude, and, its position in the series (or the count of brilliant numbers up to that point).
;Stretch
* Continue for larger orders of magnitude.
;See also
;* [https://www.numbersaplenty.com/set/brilliant_number Numbers Aplenty - Brilliant numbers]
;* [https://www.alpertron.com.ar/BRILLIANT.HTM - Like the task upper Limit 1E201]
;* [[oeis:A078972|OEIS:A078972 - Brilliant numbers: semiprimes whose prime factors have the same number of decimal digits]]