13 #ifndef PROGS_SRC_COMMON_SIGMAODD_PENTAGONAL_HPP_ 14 #define PROGS_SRC_COMMON_SIGMAODD_PENTAGONAL_HPP_ 86 #endif // PROGS_SRC_COMMON_SIGMAODD_PENTAGONAL_HPP_ unsigned long nat_type
Type for natural number used in all code, on 64 bits.
Define type and some generic functions.
std::size_t sum_divisors__euler_cache_nb()
Return the current number of items in the cache used by sum_divisors__euler()
constexpr nat_type pentagonal_neg(nat_type n)
Return the generalized pentagonal number of -n.
A lot of functions and stuffs to deal the sigma_odd problem and related stuffs.
bool sum_divisors__euler_cache_is_full()
Return true iff the cache used by sum_divisors__euler() is full. The function can clean space...
constexpr nat_type pentagonal(nat_type n)
Return the pentagonal number of n.
std::size_t sum_divisors__euler_table_nb()
Return the (constant) number of items in the table used by sum_divisors__euler()
nat_type sum_divisors__euler(nat_type n)
Calculates the sum of all divisors of n with the Euler formula about pentagonal numbers and returns i...