Perl Weekly Challenge 170: Primorial Numbers and Kronecker Product
These are some answers to the Week 170 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a few of days from now (on June 26, 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: Primorial Numbers
Write a script to generate first 10 Primorial Numbers.
Primorial numbers are those formed by multiplying successive prime numbers.
For example,
P(0) = 1 (1)
P(1) = 2 (1x2)
P(2) = 6 (1x2×3)
P(3) = 30 (1x2×3×5)
P(4) = 210 (1x2×3×5×7)