RosettaCodeData/Task/Blum-integer/00-TASK.txt

24 lines
928 B
Plaintext

;Definition
A positive integer '''n''' is a '''Blum integer''' if ''n = p x q'' is a semi-prime for which ''p'' and ''q'' are distinct primes congruent to 3 mod 4. In other words, ''p'' and ''q'' must be of the form 4''t'' + 3 where ''t'' is some non-negative integer.
<br>
;Example
21 is a Blum integer because it has two prime factors: 3 (= 4 x 0 + 3) and 7 (= 4 x 1 + 3).
;Task
Find and show on this page the first '''50''' Blum integers.
Also show the '''26,828'''th.
<br>
;Stretch
Find and show the '''100,000'''th, '''200,000'''th, '''300,000'''th and '''400,000'''th Blum integers.
For the first '''400,000''' Blum integers, show the percentage distribution by final decimal digit (to 3 decimal places). Clearly, such integers can only end in 1, 3, 7 or 9.
;Related task
* [[Semiprime]]
;References
* Wikipedia article [[wp:Blum_integer|Blum integer]]
* OEIS sequence [[oeis:A016105|A016105: Blum integers]]
<br>