project_euler.problem_800.sol1

Project Euler Problem 800: https://projecteuler.net/problem=800

An integer of the form p^q q^p with prime numbers p != q is called a hybrid-integer. For example, 800 = 2^5 5^2 is a hybrid-integer.

We define C(n) to be the number of hybrid-integers less than or equal to n. You are given C(800) = 2 and C(800^800) = 10790

Find C(800800^800800)

Functions

calculate_prime_numbers(→ list[int])

Returns prime numbers below max_number

solution(→ int)

Returns the number of hybrid-integers less than or equal to base^degree

Module Contents

project_euler.problem_800.sol1.calculate_prime_numbers(max_number: int) list[int]

Returns prime numbers below max_number

>>> calculate_prime_numbers(10)
[2, 3, 5, 7]
project_euler.problem_800.sol1.solution(base: int = 800800, degree: int = 800800) int

Returns the number of hybrid-integers less than or equal to base^degree

>>> solution(800, 1)
2
>>> solution(800, 800)
10790