__init__.pyi

3.3 kB · python · 81 lines

1from typing import Any, Literal23from numpy.typing import NDArray45APERY: float6BASEL: float7CATALAN: float8EULER: float9VISIBLE: float1011def basel(n: int) -> float:12    """Returns the Basel sum of the reciprocal squares over n terms, walking to pi squared over six."""1314def bernoulli(count: int) -> list[tuple[int, int]]:15    """Builds the first Bernoulli numbers as exact reduced fractions on the minus one half convention."""1617def beta(s: float, terms: int) -> float:18    """Returns the Dirichlet beta value, the alternating odd-denominator sum averaged over its last two partial sums."""1920def binary(limit: int) -> list[int]:21    """Returns the powers of two up to the limit."""2223def catalan(limit: int) -> list[int]:24    """Returns the distinct Catalan numbers up to the limit."""2526def chi3(number: int) -> int:27    """Returns the mod-three rhythm of the number: zero, one, minus one."""2829def chi4(number: int) -> int:30    """Returns the mod-four rhythm of the number: zero, one, zero, minus one."""3132def chi8(number: int) -> int:33    """Returns the mod-eight rhythm of the number, the discriminant minus-eight character: one on one and three, minus one on five and seven, zero on the evens."""3435def dirichlet(s: float, rhythm: list[int], terms: int) -> float:36    """Returns the L-series partial sum with a periodic rhythm painted on the terms."""3738def e_partial(n: int) -> float:39    """Returns one plus one over n raised to the n, walking to the natural base."""4041def euler_gamma_partial(n: int) -> float:42    """Returns the harmonic sum of n terms less the logarithm of n, walking to the Euler-Mascheroni constant."""4344def euler_product(s: float, limit: int) -> float:45    """Returns the Euler product of zeta, one over one minus p to the minus s over the primes up to the limit."""4647def evens(limit: int) -> list[int]:48    """Returns the even numbers up to the limit."""4950def fibonacci(limit: int) -> list[int]:51    """Returns the distinct Fibonacci numbers up to the limit."""5253def harmonic(terms: int) -> float:54    """Returns the partial harmonic sum, the reciprocals of one through the term count."""5556def lambda_(s: float, terms: int) -> float:57    """Returns the Dirichlet lambda value, one minus two to the minus s times zeta."""5859def leibniz(n: int) -> float:60    """Returns the Leibniz alternating sum of the odd reciprocals over n terms, walking to pi over four."""6162def li(x: float) -> float:63    """Returns the logarithmic integral of a positive x by the Ramanujan series, the smooth count of the primes below x."""6465def mertens(n: int) -> int:66    """Returns the Mertens function at n, the Mobius values of one through n summed."""6768def odds(limit: int) -> list[int]:69    """Returns the odd numbers up to the limit."""7071def visible(limit: int, dimension: int) -> int:72    """Counts the lattice points of the dimension-cube of the limit whose coordinates share no divisor, by Mobius inversion."""7374def wallis_half_pi(n: int) -> float:75    """Returns the Wallis product taken to n paired factors, four k squared over four k squared less one, walking to pi over two."""7677def wallis_quarter_pi(factors: int) -> float:78    """Returns the Wallis product of one minus one over the odd squares taken to n factors, walking to pi over four."""7980def zeta(s: float, terms: int) -> float:81    """Returns the zeta value above one, the partial sum closed by its Euler-Maclaurin tail."""