Hi all
I'm back with one more though problem. As Barry suggested, this is simpler, but still interesting, I hope.
As many of you know, the Luhn algorithm is used in most of the credit and debit cards to validate the number. For ex., with my cards that have 16 digits, given the 15 first digits I could find the 16th.
You have a brief explanation of the algorithm used here (look especially at the example for the number 49927398716):
Luhn algorithm - Wikipedia
Problem:
Given the 15 first digits of a credit/debit card, calculate the 16th.
Rules:
- if possible one formula
- better if the algorithm works also for numbers that don't have 15 digits (like the Wiki example)
- MVPs and experienced users please wait 12 hours before posting to allow others to have some fun.
(- No search the web for a solution, it will spoil the fun)
Remark: you can try the solution with your own cards
I post some solutions. The 4th doesn't have 15 digits.
I'm back with one more though problem. As Barry suggested, this is simpler, but still interesting, I hope.
As many of you know, the Luhn algorithm is used in most of the credit and debit cards to validate the number. For ex., with my cards that have 16 digits, given the 15 first digits I could find the 16th.
You have a brief explanation of the algorithm used here (look especially at the example for the number 49927398716):
Luhn algorithm - Wikipedia
Problem:
Given the 15 first digits of a credit/debit card, calculate the 16th.
Rules:
- if possible one formula
- better if the algorithm works also for numbers that don't have 15 digits (like the Wiki example)
- MVPs and experienced users please wait 12 hours before posting to allow others to have some fun.
(- No search the web for a solution, it will spoil the fun)
Remark: you can try the solution with your own cards
I post some solutions. The 4th doesn't have 15 digits.
Book5.xlsm | ||||
---|---|---|---|---|
A | B | |||
1 | 123456789012345 | 2 | ||
2 | 129278234762354 | 6 | ||
3 | 987654321098765 | 8 | ||
4 | ||||
5 | 4992739871 | 6 | ||
Sheet2 |
Last edited by a moderator: