# Is $k=553276187$ the smallest solution?

I search the smallest positive integer $$k$$, such that $$40!+k$$ splits into three primes having $$16$$ decimal digits. The smallest solution I found is

$$k=553\ 276\ 187$$

You can see the factorization here : http://factordb.com/index.php?id=1100000001197449481

According to my calculations, no $$k\le 2\cdot 10^6$$ does the job.

Is my $$k$$ the optimal solution ?

• Thanks again for the unmotivated downvotes ! Or does someone have a good argument why this question should be downvoted ? I am curious. Nov 27, 2018 at 9:00
• Same story here : math.stackexchange.com/questions/3012676/… Nov 27, 2018 at 9:10
• Welcome to the club of the victims of downvoters to good questions. $\to +1$ Nov 27, 2018 at 9:24
• I could no longer see that -1, (the longer you see it, the less you understand it), so i gave it a kick. I think i well understand the reasons for the questions, some years before i tried to find also an "humanly easy writable" example with two balanced prime factors. For my taste, i have a question, why do we need three factors with $16, 16, 16$ digits, something like $16, 16, 17$ instead does not work / is not acceptable? (The cubic root is $9344334059477234$, so the three prime factors must be big. Why not specify a lower bound for them?) Nov 28, 2018 at 21:44
• Peter I'm not downvoting these, but if you ask for the downvoters' motivation, the same can, frankly, be asked about the question. What motivates this particular search? Why $40!$ and $42!$ as bases in particular? Are you really asking for general results about the density of products of three large primes? Et cetera. I dare guess that addressing questions like that rather than just posting a "random challenge search" would make for a better question. Nov 30, 2018 at 11:07

The answer to the question is no, here is a slightly smaller solution: $$494\;804\;473\ .$$

sage: factor( factorial(40) + 494804473 )
8912658466556113 * 9232286052422441 * 9915818101022081


It was obtained also in sage, the program was running one day, and this is in this intermediate situation a found solution. (It is still running. It was not written to touch the numbers one by one starting with $$40!$$ in order, so this may also not be the minimal number doing the job.)

Note: As i also said in the comment, the fact that $$40!^{1/3}$$ is so close to the number $$999\dots 9$$ with $$16$$ digits makes it harder to get such decompositions with three factors of $$16,16,16$$ digits each. Because the range of the primes is not really between the $$16$$ digits numbers $$1000\dots 0$$ and $$999\dots 9$$. The computer was founding for instance also

k=    33377 40!+k = 1056334373719901 * 22413347482811693 * 34461718591042889
k=    42269 40!+k = 1859373333290887 * 2719883435120179 * 161334845671400153
k=    47189 40!+k = 1822739844251111 * 15851904710438411 * 28238324719193609
k=    55049 40!+k = 1101465899839957 * 3378301824756127 * 219268155834100091


with factors having $$\ge 16$$ digits, and also insisting that the smaller prime factor among all three of the three is bigger than $$7000\dots 0$$ ($$16$$ digits)...

k=300722963 40!+k = 7073009263847467 * 8126384986908847 * 14195263159044887
k=349245887 40!+k = 7209029739646403 * 8613116168531887 * 13140380656971067
k= 77639477 40!+k = 7252468942583363 * 7992027613367573 * 14076744068584523
k=300731429 40!+k = 7321097013439289 * 7404841114350401 * 15050577417998861
k=339499973 40!+k = 7398940260351053 * 10008305130239719 * 11018310576981439
k= 96999373 40!+k = 7532964349652891 * 9232067350535819 * 11732219831109637
k= 48531323 40!+k = 7564931816003599 * 10225749107742383 * 10547387873068219
k=465611681 40!+k = 7866432514968563 * 7912332084219151 * 13108794049712437

k=465608309 40!+k = 8221566296360779 * 9835813811956651 * 10089745359967421
k=126205139 40!+k = 8278202201940731 * 9790182376796351 * 10067421590328119
k=388112077 40!+k = 8601556182258047 * 8687613919887803 * 10918614312712297

• Thank you for your search. I think, the question is clear enough, I accept only the case of three primes with $16$ digits. I also noticed that the fact that $40!$ is "near" $10^{48}$ makes the search longer. I tried to construct good solutions, but the constructions are far worse than the number I accidently found. I found plenty of "near-misses" Nov 30, 2018 at 12:25
• The used sage code is posted now on ask.sagemath.org/question/44581/sage-program-for-40k-project/… Dec 10, 2018 at 15:25

For the record, after some algorithm saving/loading to continue, the smallest example seems to be for $$k=34\;773\;149$$ having $$40!+k=9115826756817059\cdot 9197548818733747\cdot 9731435389001413.$$ However I am afraid you can't do much better than brute force search. Generating primes directly does not work because small difference in one of the primes still leads to large difference in the overall number, eventually moving you far away from these $$k \approx10^7$$ examples you are after.