Special factorials: Difference between revisions
Content added Content deleted
m (use Int128 to prevent overflow) |
|||
Line 143: | Line 143: | ||
rf(n) = reverse_factorial(n) |
rf(n) = reverse_factorial(n) |
||
println("N Superfactorial |
println("N Superfactorial Hyperfactorial", " "^18, "Alternating Factorial Exponential Factorial\n", "-"^98) |
||
for n in 0:9 |
for n in 0:9 |
||
print(n, " ") |
print(n, " ") |
||
for f in [sf, H, af, n$] |
for f in [sf, H, af, n$] |
||
if n < 5 || f != n$ |
if n < 5 || f != n$ |
||
print(rpad |
print(rpad(f(Int128(n)), f == H ? 37 : 24)) |
||
end |
end |
||
end |
end |
||
Line 162: | Line 162: | ||
</lang>{{out}} |
</lang>{{out}} |
||
<pre> |
<pre> |
||
N Superfactorial |
N Superfactorial Hyperfactorial Alternating Factorial Exponential Factorial |
||
---------------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------------------------- |
||
0 1 |
0 1 1 0 1 |
||
1 1 |
1 1 1 1 1 |
||
2 2 |
2 2 4 1 2 |
||
3 12 |
3 12 108 5 9 |
||
4 288 |
4 288 27648 19 262144 |
||
5 34560 |
5 34560 86400000 101 |
||
6 24883200 |
6 24883200 4031078400000 619 |
||
7 125411328000 |
7 125411328000 3319766398771200000 4421 |
||
8 5056584744960000 |
8 5056584744960000 55696437941726556979200000 35899 |
||
9 1834933472251084800000 21577941222941856209168026828800000 326981 |
|||
9 8705808953839190016 2649120435010011136 326981 |
|||
The number of digits in n$(5) is 183231 |
The number of digits in n$(5) is 183231 |