How to resolve the algorithm Equal prime and composite sums step by step in the Phix programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Equal prime and composite sums step by step in the Phix programming language

Table of Contents

Problem Statement

Suppose we have a sequence of prime sums, where each term Pn is the sum of the first n primes.

Further; suppose we have a sequence of composite sums, where each term Cm is the sum of the first m composites.

Notice that the third term of P; P3 (10) is equal to the second term of C; C2 (10);

Let's start with the solution: