Documentation
¶
Index ¶
- func BigIs(bigN *big.Int) bool
- func BigIsAdditive(bigN *big.Int) bool
- func BigNext(bigN *big.Int) (bigPrime *big.Int)
- func BigNextAdditive(bigN *big.Int) (bigAdditivePrime *big.Int)
- func BigPrev(bigN *big.Int) (bigPrime *big.Int, exists bool)
- func BigPrevAdditive(bigN *big.Int) (bigAdditivePrime *big.Int, exists bool)
- func Is(n int64) bool
- func IsAdditive(n int64) bool
- func Next(n int64) (prime int64, exists bool)
- func NextAdditive(n int64) (additivePrime int64, exists bool)
- func Prev(n int64) (prime int64, exists bool)
- func PrevAdditive(n int64) (additivePrime int64, exists bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BigIsAdditive ¶ added in v1.2.0
BigIsAdditive determines whether a given number of arbitrary size is additively prime. This means that the number itself must be prime and the sum of its decimal digits must also be prime.
func BigNext ¶ added in v1.2.0
BigNext returns the next prime number after a given number of arbitrary size.
func BigNextAdditive ¶ added in v1.2.0
BigNextAdditive returns the next additive prime number after a given number of arbitrary size.
func BigPrev ¶ added in v1.2.0
BigPrev returns the previous prime number before a given number of arbitrary size. It also returns a boolean value that is set to false if no prime number exists before the given number.
func BigPrevAdditive ¶ added in v1.2.0
BigPrevAdditive returns the previous additive prime number before a given number of arbitrary size. It also returns a boolean value that is set to false if no additive prime number exists before the given number.
func IsAdditive ¶ added in v1.2.0
IsAdditive determines whether a given 64-bit number is additively prime. This means that the number itself must be prime and the sum of its decimal digits must also be prime.
func Next ¶
Next returns the next prime number after a given 64-bit number. It also returns a boolean value that is set to false if no prime number exists after the given number (not because there is no such number in the mathematical set of integers, but rather because there is no such number that can be represented by a 64-bit integer in Go).
func NextAdditive ¶ added in v1.2.0
NextAdditive returns the next additive prime number after a given 64-bit number. It also returns a boolean value that is set to false if no additive prime number exists after the given number (not because there is no such number in the mathematical set of integers, but rather because there is no such number that can be represented by a 64-bit integer in Go).
func Prev ¶ added in v1.1.0
Prev returns the previous prime number before a given 64-bit number. It also returns a boolean value that is set to false if no prime number exists before the given number.
func PrevAdditive ¶ added in v1.2.0
Prev returns the previous additive prime number before a given 64-bit number. It also returns a boolean value that is set to false if no additive prime number exists before the given number.
Types ¶
This section is empty.