Skip to content

Superfactorials #211

Open
Open

Description

@Aras14HD

Description

Superfactorials now have been requested multiple times. They are defined:

$$n\$ = \prod_{i=1}^n i! = G(n+2)$$

A simple notation, that is common enough to warrant its own command. The G here is an analytical continuation, so unlike multitermials and subfactorials (both of which I cannot find one for) it can relatively easily support decimals. One consideration to take is efficiency, we will need to approximate way earlier.

There is a sterling-like approximation:

$$\ln G(1+z) ∼ z^2\left(\frac{1}{2}\ln z-\frac{3}{4}\right)+\frac{1}{2}\ln(2\pi)z-\frac{1}{12}\ln z+\zeta'(-1)+\sum_{k=1}^n\frac{B_{2k+2}}{4k(k+1)z^{2k}}+O\left(\frac{1}{z^{2n+2}}\right)$$

Where B_k is the k-th Bernulli number approximated by:

$$B_{2n} ∼ (-1)^{n-1}4\sqrt{\pi n}\left(\frac{n}{\pi e}\right)^{2n}$$

If that proves too complex (and inefficient) there is a simpler form:

$$\ln G(1+z) ∼ z^2\left(\frac{1}{2}\ln z-\frac{3}{4}\right)+\frac{1}{2}\ln(2\pi)z-\frac{1}{12}\ln z+\zeta'(-1)+O\left(\frac{1}{z}\right)$$

Reasoning

This has been requested here:

Resources

Activity

  1. tolik518 commented on Jun 30, 2025

    @tolik518
    Owner

    I haven't found anything online after a quick google, but I can imagine multi-superfactorials might also be a topic - like with multi-termials.

  2. Aras14HD commented on Jun 30, 2025

    @Aras14HD
    CollaboratorAuthor

    It is a little more ambiguous what multisuperfactorial means:

    $$\begin{aligned} 5\$\$ &= 5! \cdot 3! \cdot 1! \\ &\text{or maybe inner} \\ 5\$\$ &= 5!! \cdot 4!! \cdot 3!! \cdot 2!! \cdot 1!! \\ &\text{or combined} \\ 5\$\$ &= 5!! \cdot 3!! \cdot 1!! \end{aligned}$$

    Also, there will most definitely be no analytical continuation anywhere. Even an approximation I would have to figure out myself, so it would be limited to only smaller integers.

  3. tolik518 commented on Jun 30, 2025

    @tolik518
    Owner

    You're right. While for me it would make sense it to be

    $$\begin{aligned} 5\$\$ &= 5! \cdot 3! \cdot 1! \\ \end{aligned}$$

    it might mean something different for others.

    Also, there will most definitely be no analytical continuation anywhere. Even an approximation I would have to figure out myself, so it would be limited to only smaller integers.

    Yeah I also don't expect too much information on that matter (or rather completely no information).

    Edit: Oopps closed the ticket by accident

  4. Aras14HD commented on Feb 27, 2026

    @Aras14HD
    CollaboratorAuthor

    Gonna write down the derivation digitally later, for now here are the formulas (except float, as I would use the Bernoulli part for them, and digits, as it makes more sense to go directly to tower):

    $$\begin{aligned} &\text{Tower} \\ 10^{10^{n}}\$ &\approx 10^{10^{10^{n}}} \\ \left(^{n}10\right)^{a}\$ &\approx \left(^{n+1}10\right)^{a} \\ &\text{Approx} \\ (n-1)\$ &\approx 10^{n^2\frac{l}{2}\ln{10}\div\ln{10}}10^{n^2\frac{1}{2}\ln{k}\div\ln{10}}10^{-n^2\frac{3}{4}\div\ln{10}} \\ & \space \space \space \space 10^{\frac{1}{2}\ln(2\pi)n\div\ln{10}}10^{-\frac{l}{12}\ln{10}\div\ln{10}}10^{-\frac{1}{12}\ln{k}\div\ln{10}}10^{\zeta'(-1)\div\ln{10}} \\ n &= k \cdot 10^l | l \in \mathbb{Z} \end{aligned}$$

    For approx, I would for each of the exponents separate whole number from decimals and make the base (the a in a*10^b) with those decimals (10^decimals). Then multiply and adjust going along. Sorta:

    exponents.into_iter().map(|x| {let b = x.clone().floor(); (ten.pow(x-b),b)}).fold((1,0), |a,e| adjust((a.0*e.0,a.1+e.1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestproposalOpen for discussion

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions