Upload files to "ex1F_goldbachs_conjecture"

This commit is contained in:
Jakob Schratter 2025-10-22 15:41:37 +02:00
commit bdf01bd761
4 changed files with 173 additions and 0 deletions

View file

@ -0,0 +1,21 @@
#pragma once
#include "mayer_primes.h"
#include <iostream>
#include <vector>
#include <iterator>
#include <cassert>
/**
This function returns the number of possible decompositions of an integer into a sum of two prime numbers.
@param[in] k first integer
@param[out] count number of decompositions
*/
size_t single_goldbach(size_t k);
/**
This function returns the number of possible decompositions into a sum of two prime numbers of all even integers in the interval [4,n].
@param[in] n upper integer bound
@param[out] count_vector vector containing the number of decompositions for a natural number the corresponding index
*/
std::vector<size_t> count_goldbach(size_t n);