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