Hexadecimal and factorial problem

In summary, the conversation revolves around determining the last hexadecimal digit of a sum of large factorials. The problem is to find the final hex digit of 1! + 2! + 3! + ... + 1000!, with the understanding that every time a factorial is added, a certain number of zeroes are accumulated at the end. It is suggested to only consider the values up to 20! and only the last four digits of the sum. After some discussion and calculations, it is determined that the last four digits of the sum from 1! through 20! is 60,313, which is equivalent to EB99 in hex notation.
  • #1
SYoungblood
64
1

Homework Statement



Hello all,

I am trying to determine the last hexadecimal digit of a sum of rather large factorials. To start, I have the sum 990! + 991! +...+1000!. I am trying to find the last hex digit of a larger sum than this, but I think all I need is a push in the right direction, because right now I am lost.

Homework Equations


To start, I have the sum 990! + 991! +...+1000!. I am trying to find the last hex digit of a larger sum than this, but I think all I need is a push in the right direction, because right now I am lost. Any info on how to determine the last hex digit of a large factorial, even just 1000!, is greatly appreciated.

The Attempt at a Solution



Where would I even begin? I tried to convert 1000 to hexadecimal form -- 3E8 -- but that didn't seem to help me at all, or at least not as much as I thought it would.

Any and all help is greatly appreciated.

SY
 
Physics news on Phys.org
  • #2
What do you mean by "a larger sum than this" ?
 
  • #3
Suppose the problem were in decimal rather than hexadecimal? What are the last digits of a large factorial number in decimal notation? Why? What about in hexadecimal?
 
  • Like
Likes SYoungblood
  • #4
GAAH.

I see what you got -- we will have a large number of zeroes (I'm too lazy to figure out how many) -- certainly more than four, which establishes divisibility by 16, and then we convert to hex.

Thank you,

SY
 
  • #5
I'd state it differently. In decimal, every time we accumulate another factor of 10, we add another zero to the end. So when we multiply by 10, 20, 30, ... each one adds a zero. Also each combination of 2 and 5 adds another zero. In hex, every time we multiply by a multiple of 16 (16, 32, 48, ...), we add a zero to the end. Also accumulating 4 powers of 2 adds another zero on the end. So 1000! will have over 200 zeros on the end, either in decimal or in hex.
 
  • Like
Likes SYoungblood
  • #6
I was able to figure it out.

Th actual question is to find the final hex digit of 1! + 2! + 3! + ... + 1000! Since, as you said, we accumulate zeroes in summing factorials at every fifth element (4!=24; 5!=120, 9!=362,880 10!=3,628,800...) we only need to find the values up to 20! (For the larger values, I cheated and used Wolfram.) We only need the sum of the last four digits, because to test divisibility by 16, we only need to check the last four digits, then like the zeroes, the changing place values shift further to the left. The final four (well, 5) digits of the sum from 1! through 20! is 60,313, and that is EB99 in hex notation.

Thanks much,

SY
 

1. What is a hexadecimal number?

A hexadecimal number is a base-16 number system that uses 16 unique symbols to represent values. These symbols include the numbers 0-9 and the letters A-F, where A=10, B=11, C=12, D=13, E=14, and F=15.

2. How is a hexadecimal number converted to decimal?

To convert a hexadecimal number to decimal, each digit is multiplied by its corresponding place value and then added together. For example, the hexadecimal number 3F can be converted to decimal by multiplying 3 (the first digit) by 16 and adding it to F (the second digit) which is equivalent to 15. This gives us a decimal value of 63.

3. What is a factorial number?

A factorial number is the product of all positive integers less than or equal to a given number. It is denoted by the exclamation mark (!) and is often used in mathematics to calculate the number of possible permutations or combinations.

4. How do you calculate the factorial of a number?

To calculate the factorial of a number, you can use the formula n! = n x (n-1) x (n-2) x ... x 2 x 1. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120.

5. How are hexadecimal and factorial numbers related?

In some cases, hexadecimal numbers can be used to represent factorial numbers. For example, the hexadecimal number 6! can be written as 18, which is equivalent to 24 in decimal. However, this relationship only applies to certain factorial numbers and is not a general rule.

Similar threads

  • Calculus and Beyond Homework Help
Replies
32
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
10K
  • General Math
Replies
1
Views
1K
  • Classical Physics
Replies
3
Views
731
  • Precalculus Mathematics Homework Help
Replies
1
Views
3K
  • Calculus and Beyond Homework Help
Replies
10
Views
991
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Atomic and Condensed Matter
Replies
16
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
Back
Top