32 nails

  • #1
So if you are putting horse shoes on a horse it takes 32 nails. Imagine telling the horse owner you will do the first nail for a penny and the second nail for 2 pennys. Each nail will be double the prior nail.Once the final nail is installed ant the total is tallied up, will he be able to pay you? You might be surprised at your bank account if he actually writes you a check for the correct amount. That would be a lot spending cash at your disposal.
 

Answers and Replies

  • #2
phinds
Science Advisor
Insights Author
Gold Member
2019 Award
16,546
6,904
So if you are putting horse shoes on a horse it takes 32 nails. Imagine telling the horse owner you will do the first nail for a penny and the second nail for 2 pennys. Each nail will be double the prior nail.Once the final nail is installed ant the total is tallied up, will he be able to pay you? You might be surprised at your bank account if he actually writes you a check for the correct amount. That would be a lot spending cash at your disposal.
This has been known since ancient times. The original was 1 grain of wheat one the first square of a chessboard, 2 on the 2nd, etc.
 
  • #3
jbunniii
Science Advisor
Homework Helper
Insights Author
Gold Member
3,393
181
$$\sum_{n=0}^{N-1} 2^n = \frac{2^{N} - 1}{2 - 1} = 2^{N} - 1 = 2^{32} - 1$$
Good thing it wasn't 33 nails, or you might have had an even bigger surprise if that slacker who programmed your bank's software used 32-bit variables...
 
  • #4
402
120
$$\sum_{n=0}^{N-1} 2^n = \frac{2^{N} - 1}{2 - 1} = 2^{N} - 1 = 2^{32} - 1$$
Good thing it wasn't 33 nails, or you might have had an even bigger surprise if that slacker who programmed your bank's software used 32-bit variables...
Depends on if they used signed or unsigned :D
 

Related Threads on 32 nails

Replies
18
Views
4K
Replies
3
Views
2K
  • Last Post
Replies
1
Views
2K
Replies
3
Views
3K
Replies
1
Views
1K
Replies
5
Views
2K
Replies
2
Views
1K
Top