Goldbach

com.phasmidsoftware.number.core.numerical.Goldbach
object Goldbach

Object providing utility methods related to Goldbach's conjecture.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Goldbach.type

Members list

Value members

Concrete methods

def goldbach(x: BigInt): Try[(Prime, Prime)]

Method to get a pair of primes which sum to a number.

Method to get a pair of primes which sum to a number.

Value parameters

x

an even number greater than 2.

Attributes

Returns

a Try of a tuple of (p1, p2) where p1, p2 are primes such that p1 + p2 = x.