-10

Consider the first prime number $p = 2$. We define its palindromic number to be $121$. Now factorize $121 = 11^2$. Take out all the distinct prime factors (excluding $p$ itself if present) and let their count be $x$. In this case, it's just $11$. So, $x = 1$. Now add all these distinct prime factors to get the sum $y$. Here, $y = 11$. Now, we observe: \[ 11 \mod 2 = 1. \] This is nothing but: \[ y \mod p = x. \]

Take the next prime $p = 3$. Palindromic number = $12321$. Factorize: $12321 = 3^2 \times 37^2$. Here, the total number of distinct factors (excluding $3$ itself) is $x = 1 $. Also, $y = 37$. Now, we see: \[ 37 \mod 3 = 1, \] which is, $y \mod p = x$.

For $p = 5$, \[ PN = 123454321 = 41^2 \times 271^2. \] Here, $x = 2$, and $y = 41 + 271 = 312$. Here also, \[ 312 \mod 5 = 2, \] which is, $y \mod p = x$.

For $ p = 7$, \[ PN = 1234567654321 = 239^2 \times 4649^2. \] Here, $x = 2$, and $y = 239 + 4649 = 4888$. Here also, \[ 4888 \mod 7 = 2, \] which is, $y \mod p = x$.

For $p = 11$, \[ PN = 10203040506070809101110090807060504030201 = 11^2 \times 23^2 \times 4093^2 \times 8779^2 \times 21649^2 \times 513239^2. \] Here, $x $ (excluding $ 11$ itself) = $5 $, and \[ y = 11 + 23 + 4093 + 8779 + 21649 + 513239 = 547794. \] Here also, \[ 547794 \mod 11 = 5, \] which is, $y \mod p = x$.

For $p = 13$, \[ PN = 1020304050607080910111213121110090807060504030201 = 53^2 \times 79^2 \times 859^2 \times 265371653^2 \times 1058313049^2. \] Here, $x = 5$, and \[ y = 53 + 79 + 859 + 265371653 + 1058313049 = 1327184593. \] Here also, \[ 1327184593 \mod 13 = 5, \] which is, $y \mod p = x$.

For $p = 17$, \[ PN = 10203040506070809101112131415161716151413121110090807060504030201 = 103^2 \times 4013^2 \times 2071723^2 \times 5363222357^2 \times 21993833369^2. \] Here, $ x = 5$, and \[ y = 103 + 4013 + 2071723 + 5363222357 + 21993833369 = 27359131565. \] Here also, \[ 27359131565 \mod 17 = 5, \] which is, $y \mod p = x$.

For $p = 19 $, \[ PN = 1020304050607080910111213141516171819181716151413121110090807060504030201 = 909090909090909091^2 \times 1111111111111111111^2. \] Here, $x = 2 $, and \[ y = 909090909090909091 + 1111111111111111111 = 2020202020202020202. \] Here also, \[ 2020202020202020202 \mod 19 = 2, \] which is, $y \mod p = x $.

For $p = 23 $, \[ PN = 10203040506070809101112131415161718192021222322212019181716151413121110090807060504030201 = 47^2 \times 139^2 \times 2531^2 \times 549797184491917^2 \times 11111111111111111111111^2. \] Here, $x = 5 $, and \[ y = 47 + 139 + 2531 + 549797184491917 + 11111111111111111111111 = 11111111660908295605745. \] Here also, \[ 11111111660908295605745 \mod 23 = 5, \] which is, $y \mod p = x $.

Likewise, the relation $y \mod p = x$, holds true for all prime numbers I could test from $2$ to $211$ and counting...

Therefore, I would like to conjecture that $y \mod p = x$ holds true for all prime numbers.

This conjecture is not a primality test, but a pattern conjectured for all primes. The pattern also holds good for some (not all) composite numbers, and even for some non-prime odd numbers. But one thing is clear: The conjecture is a yes for "all primes".

Is it possible to work out a proof for this?

Here is the big problem pointed out by @qatest: It is a conjecture, that is good. But, what I'm saying is, you have to understand what you are trying to prove. If you wanted to prove that your conjecture holds good for all primes, then it's a lot harder to do that now that you know the conjecture holds true for numbers that aren't prime but not all the odd numbers. Because it holds true for composite numbers, it's not actually related to primes. You could still prove it holds true for all primes by proving it holds true for all odd numbers, but we already know it doesn't, so you have to prove it holds true without much guidance now.

For you reference, here is the python code to generate the palindromic number of any prime number you input:

def generate_pattern_number(n):
    # Determine the width of numbers (number of digits in n)
    width = len(str(n))
# Generate the ascending sequence with leading zeroes
ascending = ''.join(f"{i:0{width}}" for i in range(1, n + 1))
# Generate the descending sequence with leading zeroes
descending = ''.join(f"{i:0{width}}" for i in range(n - 1, 0, -1))

# Combine both to get the final pattern
pattern_number = ascending + descending
return pattern_number

Input the integer

n = int(input("Enter an integer: ")) result = generate_pattern_number(n) print(f"The generated number for {n} is:\n{result}")

You may use the following website to factorize the palindromic number: https://www.dcode.fr/prime-factors-decomposition

To find the modulo, use this: https://www.dcode.fr/modulo-n-calculator

This question has been cross-posted on MathOverflow. See:

https://mathoverflow.net/questions/483184/conjectured-a-relation-between-primes-and-palindromic-numbers
Bill Dubuque
  • 282,220

1 Answers1

3

This conjecture is true

First of all, you were asking how to prove this. The problem statement is quite complex, and it introduces a lot of concepts that - on closer inspection - aren't actually needed and only obscure the actual question. So this answer will focus much more on how to simplify your conjecture and remove extraneous details. Once that's done, the proof is relatively easy.

For example, did you notice that your "palindromic numbers" are all perfect squares? $121 = 11^2$, $1234567654321 = 1111111^2$, and $10203040506070809101110090807060504030201 = 101010101010101010101^2$. Squares obviously have the same prime factors as their square roots, so really the "palindromic numbers" are a red herring. It would be easier to ask the question about repeating strings of $1$s, or $01$s or $001$s as the case may be.

By "repeating strings of $1$s or $01$s or $001$s" I really mean the numbers of the form $b^{p-1} + b^{p-2} + \ldots + b + 1$ for $b = 10$ or $100$ or $1000$. And at this point you should wonder if the specific values of $b$ are another red herring and if this actually holds for any natural number $b$.

Finally:

Take out all the distinct prime factors [of $PN$] (excluding $p$ itself if present) and let their count be $x$. [...] Now add all these distinct prime factors to get the sum $y$. Now, we observe: $$y \mod p=x$$

A needlessly complicated process! As discussed in the comments, there's a much stronger version that's easier to reason about:

All the prime factors of $PN$ (excluding p) are congruent to 1 mod p.

So, putting all this together, we have a shorter and clearer conjecture which is a generalization of the one you gave:

For any prime $p$, let the polynomial $f_p(b)$ = $b^{p-1} + b^{p-2} + \ldots +b + 1$. Then the prime divisors of $f_p(b)$ are either equal to $p$ or congruent to $1$ mod $p$.

(For reference, $f_p$ is also called the $p$th cyclotomic polynomial.)

(You can experiment with some of the new cases this adds, for example $f_3(7) = 49+7+1 = 57 = 3 \times 19$, and indeed $19 \equiv 1 \mod 3$.)


This conjecture is true. The proof can be found in this Stack Exchange post from 2013.

Toph
  • 1,566
  • 7
  • 17