Documentation

Sequencelib.Sylvester

Sylvester's sequence #

This file introduces the Sylvester's sequence

Implementation notes #

We follow the presentantion from Wikipedia.

Main results #

References #

OEIS sequence offset

Equations
Instances For

    OEIS Identifier

    Equations
    Instances For

      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.

      Coprimality #

      Explicit formula #

      noncomputable def Sequence.sylvesterConstant :

      The constant that gives an explicit formula for the Sylvester's 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's sequence: $$ \mathrm{sylvester}~n = \left\lfloor\mathrm{sylvesterConstant}^{2^{n+1}} + \frac{1}{2}\right\rfloor, $$ for all natural $n$.

        Sum of reciprocals #

        Partial sums of the series ∑ 1/(sylvester i).

        Equations
        Instances For

          Formula for the partial sums: $$ \sum_{i=0}^{n-1} \frac{1}{\mathrm{sylvester}~i} = 1 - \frac{1}{\mathrm{sylvester}~n - 1}. $$