Runs core process to find problem solution. >>> run(3) [644, 645, 646]
(n: int)
| 70 | |
| 71 | |
| 72 | def run(n: int) -> list[int]: |
| 73 | """ |
| 74 | Runs core process to find problem solution. |
| 75 | >>> run(3) |
| 76 | [644, 645, 646] |
| 77 | """ |
| 78 | |
| 79 | # Incrementor variable for our group list comprehension. |
| 80 | # This is the first number in each list of values |
| 81 | # to test. |
| 82 | base = 2 |
| 83 | |
| 84 | while True: |
| 85 | # Increment each value of a generated range |
| 86 | group = [base + i for i in range(n)] |
| 87 | |
| 88 | # Run elements through the unique_prime_factors function |
| 89 | # Append our target number to the end. |
| 90 | checker = [upf_len(x) for x in group] |
| 91 | checker.append(n) |
| 92 | |
| 93 | # If all numbers in the list are equal, return the group variable. |
| 94 | if equality(checker): |
| 95 | return group |
| 96 | |
| 97 | # Increment our base variable by 1 |
| 98 | base += 1 |
| 99 | |
| 100 | |
| 101 | def solution(n: int = 4) -> int | None: |