Problems & Puzzles: Puzzles

Puzzle 526. p2^2-p1^2 = n!


JM Bergot sent the following puzzle:

One wonders what factorials are the difference of two
squared primes. One has:

7^2 - 5^2= 4!
31^2 - 29^2 = 5!;
181^2 - 179^2 = 6!;
73^2 - 17^2 = 7!
223^2 - 97^2 = 8!

What other factorials are like this?
 

A small search made by Carlos Rivera found that you can easily find primes as the asked by Bergot for all factorials from 9! to 20!. I won't bore you with all the details. I will give just the primes for 20!

20! = 1613360743^2- 412348007^2

I can not see any reason for not finding primes for any factorial larger than 3!

Q. Please send only your largest n! and the associated primes p2 & p1?

 

Contributions came from Qu Shun Liang, Seiji Tomita, Jan van Delden, Farideh Firoozbakht, Flavio Torasso, Torbjörn Alm, J-C Colin, Fred Schalekamp & J. K. Andersen (the champion on this puzzle).

***

Qu Shun Liang wrote:

n=300
p2=2557769884870458975433751605736767063842732412334228319936756770652124675691
0544984234328031090207607157202262540767852316934385337154284535161616200460883
3848338235835514327007729920163102289451350017044971920815368201575929530580723
1845062738928259410758147904966704082895648315944487548544815131859900773397664
96598715593671388138830828110744333697816290244866997372664164680585054503
p1=2557769884870458975433751605736767063842732412334228319936756770652124675691
0544984234328031090207607157202262540767852316934385337154284535161616200460883
3847739946063578996613369263246456856685906622330416897420774198409641012408065
5478629515323558086472000150459514084682330186794492208613025900409897205593248
96598715593671388138830828110744333697816290244866997372664164680585054503

***

Seiji Tomita wrote:

p2=276384705984033308637202339150514288597566735
956134302322651975852591031511162474178712137149511

p1=276384705984033308637202339150514119763667060
379313099534757288812482494631443188167174093319239

100!= p2^2- p1^2

It seems that there is always a solution for any factorial larger than 3!

***

Jan van Delden wrote:

The solution (p1,p2) for n>=4 is of the form n!/(2x)+/-x where x equals product(p[i]^m[i], p[i] in a nonempty subset of primefactors of n!/4) and m[i] equals the full multiplicity of the p[i] in n!/4, or p1 and p2 are twin primes.

A solution for n=500, with minimal difference p2-p1: x=211^2.271.433, p1 and p2 both have 1124 digits.

And n=75 has 2918 different solutions, a solution with p1+p2 minimal:
p1 = 30481973438844862887910937070098434517692813431831311
p2 = 4980970785108072136649849708963654371394714107954887439

***

Farideh Firoozbakht wrote:

n = 700,

p1 = 700! / (4*180156211) - 180156211
p2 = 700! / (4*180156211) + 180156211

P1 = 700! / (4*198450781) - 198450781
P2 = 700! / (4*198450781) + 198450781

700! = p2^2 - p1^2 = P2^2 - P1^2

***

Flavio Torasso wrote:

34!=17261416581131329757^2-1650364610548670243^2

***

Torbjörn Alm wrote:

161831256997^2 - 18366790747^2 = 23!

***

J-C Colin wrote:

n=591!= p1=188856901073473414064616295367565936841473132710795788895242095294719698676251
95062102529144014345463176324986323759166245393727880365525216878356600805493642147264379
99955325331007864106640885609928760424806848307036752684696530874564454285701023325276206
54990262073030265160364862318891381188022507927094250514732318474469074140786102484599475
46605078877221180128204253909443964274960766063866958232454496878692177888274888298423708
04350588579732371288604257236233228954037320293971842775844970359760412855197122950100440
47925555803760485363109658924458779026586027492703939243346022251876831241445983674611853
52542895348165497505627633748976577954955556330520334691265940481204034167025226211982602
90930764018893715266251252478039128181319410846673001951718251089127081454462513071916312
15190072921901384684652149249251137876239120657975450863453393234847783303164148252826730
05663159468104774706077516882063969254664183724284627612244430856222118904348735907048337
89864518479703205109190084107150188208091786672426740191987680563976495341671974511844432
93003926137355390402111142363412693340746420348209271120889943496556161252977523376312072
21412331938204845775426140562578722492064331397062841931730484318908553669773953387724800
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000176569
p2=18885690107347341406461629536756593684147313271079...23431

Joined the zipped prime certificates of p1, p2

***

Fred Schalekamp wrote

N! = 304.888.344.611.713.860.501.504.000.000
P2 = 562.608.177.258.653
P1 =107.887.054.397.597

***

J. K. Andersen wrote:

With 216-digit primes that are consecutive:
129! = (129!/316+79)^2 - (129!/316-79)^2

With 1583-digit primes proved by Marcel Martin's Primo:
666! = (666!/(4*m)+m)^2 - (666!/(4*m)-m)^2, for m = 24675061867

With 5756-digit probable primes found with PrimeForm/GW:
2010! = (2010!/(4*m)+m)^2 - (2010!/(4*m)-m)^2, for m = 4365335814353

***

 

 

 

 

Records   |  Conjectures  |  Problems  |  Puzzles