# Questions tagged [factorial]

Involving calculation or other usage of factorials

19 questions
Filter by
Sorted by
Tagged with
15k views

2k views

### A ​Note ​on ​N!

J. E. Maxfield proved following theorem (see DOI: 10.2307/2688966): If $A$ is any positive integer having $m$ digits, there exists a positive integer $N$ such that the first $m$ digits of \\$...
3k views

### Big numbers: Ultrafactorials

This question was reworked, please re-read it. Ultrafactorials The ultrafactorials are a sequence of numbers which can be generated using the following function: ...
3k views

### Last non-zero digit of n!

Given an integer 1 ≤ N ≤ 1,000,000 as input, output the last non-zero digit of N!, where ! is the factorial (the product of all numbers from 1 to N, inclusive). This is OEIS sequence A008904. Your ...
3k views

### Calculate the inverse of factorial

Write the shortest code that will take any real number greater than 1 as input and will output its positive inverse factorial. In other words, it answers the question "what number factorial is equal ...
3k views

### Factorial digit sum

The challenge is to calculate the digit sum of the factorial of a number. Example Input: 10 Output: 27 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800, and the sum of ...
28k views

### Mathematics is fact. Programming is not

In mathematics an exclamation mark ! often means factorial and it comes after the argument. In programming an exclamation mark !...
3k views

### Factorials and never ending cycles!

As you may know it, the factorial of a positive integer n is the product of all the positive integers which are equal or smaller to ...
338 views

### Finding Factorials with Gamma [duplicate]

Introduction We know that the factorial notation is valid for all natural numbers. However, Euler had extended it for all positive real numbers, as well as for complex numbers by defining a function, ...
867 views

### Factoring factorials

Today in my statistics class, I found that some factorials can be simplified when multiplied together! For example: 5! * 3! = 5! *3*2 = 5! *6 = 6! Your job: Given ...
3k views

### Pseudofactorial

There is a rather curious number which shows up sometimes in math problems or riddles. The pseudofactorial(N) is the least (i.e. lowest) common multiple of the numbers 1 through N; in other words, it'...
2k views

In mathematics, the factorial, shortened "fact" of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, 5! is 1 * 2 * 3 * 4 * 5 = 120 ...
683 views

### Do two numbers contain unique factorials?

Break two numbers up into their factorials; if they share any, return a falsey value. Otherwise, return a truthy value. (inspired by this recent question) In other words, write each input number as ...
9k views

### Calculate the factorial of a number without using recursion or loops [closed]

The goal of this code golf is to create a program that calculates the factorial of a positive number, without using recursion or loops. The rules: Your program should prompt for input. This input ...
6k views

### How much can you quickly multiply?

With the recent Python bashing, here's an attempt to show Python's strengths. Your challenge is to write a program that calculates the factorial of as high a number ...