Upload files to "ex1F_goldbachs_conjecture"
This commit is contained in:
parent
2ac165d667
commit
bdf01bd761
4 changed files with 173 additions and 0 deletions
21
ex1F_goldbachs_conjecture/goldbach.h
Normal file
21
ex1F_goldbachs_conjecture/goldbach.h
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue