Documentation

SpecialNumbers.Sylvester

Sylvester sequence #

This file introduces the Sylvester's sequence. This is sequence A000058 in [OEISFI25].

Implementation notes #

We follow the presentantion from Wikipedia.

Main results #

References #

def sylvester :

Sylvester sequence: https://oeis.org/A000058.

Equations
Instances For
    @[simp]
    @[simp]
    @[simp]
    @[simp]

    This recurrence motivates the alternative name of Euclid numbers: $$ \mathrm{sylvester}~n = 1 + \prod_{i=0}^{n-1} \mathrm{sylvester}~i, $$ assuming the product over the empty set to be 1.

    theorem sylvester_mod_eq_one {m n : } (h1 : m < n) :
    theorem sylvester_coprime {m n : } (h : m n) :
    (sylvester m).Coprime (sylvester n)
    noncomputable def sylvesterConstant :

    The constant that gives an explicit formula for the Sylvester sequence: $$ \mathrm{sylvester}~n = \left\lfloor\mathrm{sylvesterConstant}^{2^{n+1}} + \frac{1}{2}\right\rfloor, $$ for all natural $n$. The constant is approximately $1.2640847\ldots$.

    Equations
    Instances For

      Explicit formula for the Sylvester sequence: $$ \mathrm{sylvester}~n = \left\lfloor\mathrm{sylvesterConstant}^{2^{n+1}} + \frac{1}{2}\right\rfloor, $$ for all natural $n$.