Is your name also a NUMBER? | Find what number your name is with math and code
text
Unveiling The Numeric Nature of Names
With 1 quadrillion, 360 trillion, and some change in mind, let's delve into how everyone's name can also be seen as a number. Intrigued? We invite you to explore this with us.
First things first, here's what we'll be covering:
- Representation in different bases
- Finding patterns in higher bases
- Discovering your name as a number
On Representing Numbers
We've already looked into how numbers can be expressed in different bases. As we go beyond base 10
, we start using letters as digits, necessitating more unique characters. But what's truly fascinating is the idea that our names can also be expressed as numbers in a specific base.
let base10 = 1360000000000000;
let base36 = base10.toString(36);
So why does this matter? Because with this concept, we open up a whole new way of looking at numbers and text as interconnected.
Your Name, In Numbers
Using another notebook we've prepared, you can play around with different bases. Let's say you pick a random number in the quadrillions and begin manually checking each base. If luck is on your side, you might find that your name spells out in one of these bases!
function findNameInBase(name, base) {
let num = parseInt(name, base);
return num;
}
let name = "deep lizard";
let base = 36;
let nameAsNum = findNameInBase(name, base);
And voila! Now you know your name in numbers. And don't worry, if you think this is a matter of sheer luck, it isn't. We've used methods to find the right number.
Constraints and Considerations
Before we wrap up, let's touch on constraints. You might notice that we can't go beyond 10
characters. This is due to range constraints, which are a general limitation of computing resources. In JavaScript, for example, the largest integer that can be represented is about 9 quadrillion.
const maxInt = Number.MAX_SAFE_INTEGER; // 9 quadrillion
These are the types of challenges we often run into. Keep this in mind, continue to explore, and most importantly, keep up the hard work. We look forward to seeing you in the next exploration!
quiz
resources
updates
Committed by on