The original post is probably prime. A prime factor can be up to the square root of a number. For this 1800 digit number, the square root is 900 digits. How can anyone know for sure that the number Elon posted is in fact prime?
For this post "potentially prime" means contains no prime factors smaller than 1 million. That is the limit of my patience. (About 6 minutes with my quickly cobbled together C++ program, compiled with -O3.)
If the 7 is shifted one character to the right, the prime factors are 29, 83, ...
If the 7 is shifted one character to the left, the prime factors are 1399, ...
If the 7 is shifted one character up, the prime factors are 231529, ...
If the 7 is shifted one character down, the prime factors are 12277, 47981 ...
If the 7 is changed to 1, the prime factors are 7, 11, 13, 2591, 24373 ...
If the 7 is changed to 2 it is potentially prime.
If the 7 is changed to 3, the prime factors are 3, 19, ...
If the 7 is changed to 4, the prime factors are 653, ...
If the 7 is changed to 5 it is potentially prime.
If the 7 is changed to 6, the prime factors are 3, ...
If the 7 is changed to 8, the prime factors are 7, 21701 ...
If the 7 is changed to 9, the prime factors are 3, 439 ...
TL;DR It's likely that the 7 needs to be where it is and it needs to be a 7.
I was also scratching my head on this, how can he generate that prime number while embedding an X logo as well as a "17" in a 60x30 matrix of numbers. I tried to generate an 1800 digit prime number, all I got was the first prime number containing 1800 digits that started with a "1", ending with "1953" and all "0"s in between, using below python script (as suggested by AI):
import sympy
prime_number = sympy.nextprime(10**1799)
print(f"A prime number with 1800 digits:\n{prime_number}")
It would require a lot of computing power to get what Elon obtained (he probably used Grok for this).