High School Number of palindromes made of n digits

  • Thread starter Thread starter archaic
  • Start date Start date
Click For Summary
SUMMARY

The discussion focuses on the mathematical formulas for calculating the number of palindromes made of n digits. For even n, the formula is P = 9 * 10^((n-2)/2), and for odd n (where n ≠ 1), it is P = 9 * 10^((n-1)/2). The participants confirm that the formula works for n=2, yielding 9 palindromes (11, 22, 33, etc.), and clarify that all 1-digit numbers are trivial palindromes, resulting in 9 valid options. The conversation highlights the importance of defining what constitutes a palindrome, particularly for n=1.

PREREQUISITES
  • Understanding of basic algebra and exponentiation
  • Familiarity with the concept of palindromes in mathematics
  • Knowledge of digit representation in numerical systems
  • Ability to interpret mathematical formulas and their applications
NEXT STEPS
  • Research combinatorial mathematics related to palindrome generation
  • Explore the implications of digit constraints in number theory
  • Learn about mathematical definitions and properties of palindromes
  • Investigate variations of palindrome formulas for different numeral systems
USEFUL FOR

Mathematicians, educators, students studying number theory, and anyone interested in combinatorial mathematics and palindrome properties.

archaic
Messages
688
Reaction score
214
Hello! A while I tried to find a formula that allows finding the number of palindromes and I actually came up with something :
So let's say P is the number of palindromes made of n digits,
if n is even then P = 9 * 10^\frac{n-2}{2}
else if n is odd and =/= 1 then P = 9 * 10^\frac{n-1}{2}
This probably exists somewhere on the internet, but who knows ..
See ya!
 
Last edited:
Mathematics news on Phys.org
does it work for n=1 and n=2?
 
phinds said:
does it work for n=1 and n=2?
Thanks for your answer, I didn't consider n = 1 ..
It works for n = 2 though, 9 * 100 = 9 (11,22,33,44,55,66,77,88,99).
 
Last edited:
  • Like
Likes Janosh89
Where is the problem with n=1? All 1-digit numbers are trivial palindromes, and the formula gives 9.

There are 9 options for the firs digit (no 0) and 10 options for each following digit up to the center of the number. For even n this means a total of n/2 numbers you are free to choose, for odd n it is (n+1)/2. Taking out the first one, we have (n-2)/2 and (n-1)/2 digits with 10 choices and 1 digit with 9 choices. The rest of the number follows from these choices. And that leads to the formulas in the first post.
Nice observation!
 
mfb said:
Where is the problem with n=1? All 1-digit numbers are trivial palindromes, and the formula gives 9.

There are 9 options for the firs digit (no 0) and 10 options for each following digit up to the center of the number. For even n this means a total of n/2 numbers you are free to choose, for odd n it is (n+1)/2. Taking out the first one, we have (n-2)/2 and (n-1)/2 digits with 10 choices and 1 digit with 9 choices. The rest of the number follows from these choices. And that leads to the formulas in the first post.
Nice observation!
Thank you!
I went to check and actually it states here that 0 is considered a palindrome.
 
  • Like
Likes scottdave
It is a palindrome, but is it a 1-digit number?
A matter of definition I guess.
 
  • Like
Likes Janosh89 and archaic

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K