Problems & Puzzles: Puzzles

Puzzle 1173  F(p)=(p^2+1)/2 with p prime

Sebastián Martín Ruiz  sent the following nice puzzle:

F(p)= (p^2+1)/2 is a square in the following cases:

p=7, F(p)=25=5^2
p= 41, F(p)=841=29^2
p=239, F(p)=28561=13^4
p=9369319, F(p)=43892069261881=37^2*179057^2

Q) Find more terms in this series


From April 27 to May 3, 2024, contributions came from Giorgos Kalogeropoulos, Michael Branicky, Paul Cleary, Emmanuel Vantieghem, Gennady Gusev, Shyam Sunder Gupta, V. F. Izquierdo, J-M Rebert, Ken Wilke, Mohamed Raja, Adam Stinchcombe, Simon Cavegn

***

Giorgos Kalogeropoulos wrote:

This is  A088165
So, we can find more terms and more information about these numbers there.

***

Michael Branicky wrote:

7, 41, 239 and 9369319 are all prime terms in OEIS A086395: Primes found among the numerators of the continued fraction rational approximations to sqrt(2).

The following terms in A086395 are also in the series, with F(p) square:

 
63018038201
489133282872437279
19175002942688032928599
123426017006182806728593424683999798008235734137469123231828679
118119373866262081485223899617886417593271902402645222441921910431040354300019446804767966058309121
70393657629419512300176098237919643553997207020010109405976727793670773944409421814790772590069113145391
735749901577009096149305609025491601824219052328961940201
228974524552809050788283360051156249247289853445354827969699100229734715189068108939562801569352522895929
715782892801204761955061870146621251580672519463200522350228503627749598922100083501854376556678063361693
192383119263372332155965842418829061431628302088077180458132394612442738848832853798158092286918974225934
50549445039659091869534560354914296851424561
1540082618098998669024285822687063977120001250694755122499946279676784700739427027858889641254834107747247
9476188898758454807130149070596399275669352955595558902646895915644155499979601804654422207852166810541196
8897815508782369617320598616176357046631308873299365244174183560089669343957767158708822118475584411679552
202834200395057475221548485001826312210106279
1524292152515359643868604110650015564099014244540971352096171632009871930662567358364858506408255703763257
4007016542862464585413855325419987306924172938043329571057741136881712317512118795220089192610068501585848
2058799673374817150782941955651966975242123399157996320587987175805401632865439263435686054321354676772189
4269896651385556977561402072422869791155369716198039140057596727796266385907831644985674318031764589999985
5793529475331403866733038463348701179514835110098473935045744253645698052307463456458313291050444620470613
419864675747501626402069994160092799834761
226750279789940552156337993282001628523627588887520533905974780579870490518881404209400460416710202911198
349618801676120820476493282824887774890673285300537876417838867189143252632916574265784789365838354100871
761640089019332576813794499158780206732712206309396501658841531166578576696276454264097764026752302409975
074070290058039914263155318198754202212110831743515736199366564029798515324035055621500362780537164798797
665123250850726995521535010942659138033937358039415426614194851847382392600962252892759174330435692573276
422891908666663512497240265395844190788270017519220012144761949970222459895368795986544375247297373061777
41930889373223532263308052774672760255302595944667374444996689881229923030796325067791266157267481

***

Paul Cleary wrote:

I found another 6 terms, the numbers are getting quite large and not easy to read.

 
p=7,= F(p)=25={{5,2}}
p=41,= F(p)=841={{29,2}}
p=239,= F(p)=28561={{13,4}}
p=9369319,= F(p)=43892069261881={{37,2},{179057,2}}
p=63018038201,= F(p)=1985636569351347658201={{44560482149,2}}
p=489133282872437279,= F(p)=119625684206783871996993080894461921={{3761,2},{91962100830401,2}}
p=19175002942688032928599,= F(p)=183840368926047361112315395593676258316051401={{13558774610046711780701,2}}
p=123426017006182806728593424683999798008235734137469123231828679,= F(p)=761699083700526370841019997065714
8760082041163162495367483045967299990423693775194206356748206283254879235715250785203442521={{820541,2},{41
2124309,2},{168867731761219532933,2},{1528327854129402847802890657,2}}
p=118119373866262081485223899617886417593271902402645222441921910431040354300019446804767966058309121
= F(p)=69760932412788987939145526970360288829799554364947343650710964464063996624263485952103800910808
9582340861460517653553481740260456140958304086239590187330894155816455279775980856708117862795896321=
{{1640689,2},{623700659351936833,2},{81621330294770651861320888171562587614620304100785844883920376945100294097,2}}
p=70393657629419512300176098237919643553997207020010109405976727793670773944409421814790772590069113145391
735749901577009096149305609025491601824219052328961940201
= F(p)=2477633517223965956050338531054185093930627287566043737847149124261894055909932938710328964465045117895198
705516619830550111238942567423305140604894483437029734548669349415291101042442001398020871731970273790418605504
345482069492893509277211721834849342937929396452040141273945863173768429043815802351656888502403149960201
={{1081818484868497,2},{189222836424246529,2},{173241429245578164617,2},{1403585359808090345497967122578396075750569180352430137427281089083490283804221301594329934327712251251730
181,2}}

***

Emmanuel Vantieghem wrote:

***

Gennady Gusev wrote:

This equation reduces to the Pell equation: (p^2+1)/2=a^2 -> 2*a^2-p^2=1.
The first solution is p=7, a=5. The following solutions are determined by the recurrent formula: p=3*p+4*a, a=2*p+3*a.
By the condition of the problem, p must be a prime number. After 2000 iterations (it took 10 sec.) , 14 solutions were found:
p=7, a=5
p=41, a=29
p=239, a=169
p=9369319, a=6625109
p=63018038201, a=44560482149
p=489133282872437279, a=345869461223138161
p=19175002942688032928599, a=13558774610046711780701
p=123426017006182806728593424683999798008235734137469123231828679, 
  a=87275373599917999482560755526644279276078854297832438763690789
p=118119373866262081485223899617886417593271902402645222441921\
  910431040354300019446804767966058309121, a=83523010250342981\
  71990535422887155607588204233065687979373480566479378860549397\
  7036442673881477889
p=703936576294195123001760982379196435539972070200101094059767\
  27793670773944409421814790772590069113145391735749901577009096\
  149305609025491601824219052328961940201, a=49775832662286684\
  80545624692373233139290457521141816865114894498417997932288780\
  90010364391137803439609184849716888714034512509460527841092881\
  20303097849764975101
p=228974524552809050788283360051156249247289853445354827969699\
  10022973471518906810893956280156935252289592971578289280120476\
  19550618701466212515806725194632005223502285036277495989221000\
  83501854376556678063361693192383119263372332155965842418829061\
  43162830208807718045813239461244273884883285379815809228691897\
  422593450549445039659091869534560354914296851424561, a=16190\
  94390302569031167554421436134379523476605462630016900437774609\
  30793431158742114200996546909498159847837140668920394000474798\
  53611365699295650412376047361934416970855010379495856551716751\
  59698118394352331256272064182096515019202466059939532037156743\
  29018248548057410132993955374829889147237990445084913232505251\
  84609976983183669368792435242099462994295481
p=154008261809899866902428582268706397712000125069475512249994\
  62796767847007394270278588896412548341077472479476188898758454\
  80713014907059639927566935295559555890264689591564415549997960\
  18046544222078521668105411968897815508782369617320598616176357\
  04663130887329936524417418356008966934395776715870882211847558\
  4411679552202834200395057475221548485001826312210106279, a=
  10890028628453338879561863821306215525438004539101362555955616\
  83947419411028590812788338293519176941758089140435788660549947\
  52588460415889380357156261948996362400328611148078760868240983\
  28017659139289964553631078957822420473574068246761092296401321\
  80224870853817402246509111647060758535441728493381810278856521\
  62443421249932898756000553002144243166691962503308661
p=152429215251535964386860411065001556409901424454097135209617\
  16320098719306625673583648585064082557037632574007016542862464\
  58541385532541998730692417293804332957105774113688171231751211\
  87952200891926100685015858482058799673374817150782941955651966\
  97524212339915799632058798717580540163286543926343568605432135\
  46767721894269896651385556977561402072422869791155369716198039\
  14005759672779626638590783164498567431803176458999998557935294\
  75331403866733038463348701179514835110098473935045744253645698\
  05230746345645831329105044462047061341986467574750162640206999\
  4160092799834761, a=1077837317553049938348609668714756800735\
  64346431063069314371272240159321401717869578363752047180804272\
  76978208983345327539083290106784346280097886690708486579474807\
  79380108177368455583705613856731786553917345140726733128313690\
  87228420813419793797171892943353998771498759037523140825580857\
  99795634706567616602618154384510626818176478596794869912196445\
  70520158400416234016494503704217046632412600430479567796881976\
  16215415077853474111409031986647785213615421865828369075963740\
  93354959576255564880446331251472947296840960792737049721799484\
  181245489549002501104613262518182669
p=226750279789940552156337993282001628523627588887520533905974\
  78057987049051888140420940046041671020291119834961880167612082\
  04764932828248877748906732853005378764178388671891432526329165\
  74265784789365838354100871761640089019332576813794499158780206\
  73271220630939650165884153116657857669627645426409776402675230\
  24099750740702900580399142631553181987542022121108317435157361\
  99366564029798515324035055621500362780537164798797665123250850\
  72699552153501094265913803393735803941542661419485184738239260\
  09622528927591743304356925732764228919086666635124972402653958\
  44190788270017519220012144761949970222459895368795986544375247\
  29737306177741930889373223532263308052774672760255302595944667\
  374444996689881229923030796325067791266157267481, a=16033666\
  04754139233686429885490882739765641688853937240022966202572824\
  05469162045889199030324126111866433122445032047736527160736259\
  96818601415464556837159848695320696330094678715653042523918140\
  33051284305894511323167358092021516179716154679185568475052097\
  47100331584582636277962485155169642042517659018902582889265257\
  27445507451457668170228115341121827358266956215271426565250868\
  99128901269941340545472525972165925109736470954936768641055870\
  21115213661494251998398142883488007636573915432207710238140603\
  57362494791980747192522753406501225311320550753910225186521286\
  74370668517001483361552427480650018911337824579714606971874425\
  31668132853196463910429936247550023411222977557713669646035276\
  03617398356705321445318830929291530709

***

Shyam Sunder Gupta wrote:

Puzzle 1173 F(p)=(p^2+1)/2 with p prime:

The primes p, such that (p^2+1)/2 is a square are called NSW primes.
The first fourteen such primes including the four above as given in
OEIS A088165 are:
7, 41, 239, 9369319, 63018038201, 489133282872437279,
19175002942688032928599,
123426017006182806728593424683999798008235734137469123231828679,
118119373866262081485223899617886417593271902402645222441921910431040
354300019446804767966058309121,
703936576294195123001760982379196435539972070200101094059767277936707
739444094218147907725900691131453917357499015770090961493056090254916
01824219052328961940201,
228974524552809050788283360051156249247289853445354827969699100229734
715189068108939562801569352522895929715782892801204761955061870146621
251580672519463200522350228503627749598922100083501854376556678063361
693192383119263372332155965842418829061431628302088077180458132394612
442738848832853798158092286918974225934505494450396590918695345603549
14296851424561,
154008261809899866902428582268706397712000125069475512249994627967678
470073942702785888964125483410774724794761888987584548071301490705963
992756693529555955589026468959156441554999796018046544222078521668105
411968897815508782369617320598616176357046631308873299365244174183560
089669343957767158708822118475584411679552202834200395057475221548485
001826312210106279,
152429215251535964386860411065001556409901424454097135209617163200987
193066256735836485850640825570376325740070165428624645854138553254199
873069241729380433295710577411368817123175121187952200891926100685015
858482058799673374817150782941955651966975242123399157996320587987175
805401632865439263435686054321354676772189426989665138555697756140207
242286979115536971619803914005759672779626638590783164498567431803176
458999998557935294753314038667330384633487011795148351100984739350457
442536456980523074634564583132910504446204706134198646757475016264020
69994160092799834761,
226750279789940552156337993282001628523627588887520533905974780579870
490518881404209400460416710202911198349618801676120820476493282824887
774890673285300537876417838867189143252632916574265784789365838354100
871761640089019332576813794499158780206732712206309396501658841531166
578576696276454264097764026752302409975074070290058039914263155318198
754202212110831743515736199366564029798515324035055621500362780537164
798797665123250850726995521535010942659138033937358039415426614194851
847382392600962252892759174330435692573276422891908666663512497240265
395844190788270017519220012144761949970222459895368795986544375247297
373061777419308893732235322633080527746727602553025959446673744449966
89881229923030796325067791266157267481.

***

V. F. Izquierdo wrote:

This sequence continues with:
p=63018038201
p=489133282872437279
p=19175002942688032928599
p=123426017006182806728593424683999798008235734137469123231828679
p=703936576294195123001760982379196435539972070200101094059767277936707739444094218147907725900691131453917
35749901577009096149305609025491601824219052328961940201
p=2289745245528090507882833600511562492472898534453548279696991002297347151890681089395628015693525228959297
157828928012047619550618701466212515806725194632005223502285036277495989221 000835018543765566780633616931923
8311926337233215596584241882906143162830208807718045813239461244273884883285379815809228691897422593450549445
039659091869534560354914296851424561
p=15400826180989986690242858226870639771200012506947551224999462796767847007394270278588896412548341077472479
4761888987584548071301490705963992756693529555955589026468959156441554999796018046544222078521668105411968897
8155087823696173205986161763570466313088732993652441741835600896693439577671587088221184755844116795522028342
00395057475221548485001826312210106279
p=15242921525153596438686041106500155640990142445409713520961716320098719306625673583648585064082557037632574
0070165428624645854138553254199873069241729380433295710577411368817123175121187952200891926100685015858482058
7996733748171507829419556519669752421233991579963205879871758054016328654392634356860543213546767721894269896
6513855569775614020724228697911553697161980391400575967277962663859078316449856743180317645899999855793529475
3314038667330384633487011795148351100984739350457442536456980523074634564583132910504446204706134198646757475
01626402069994160092799834761
p=22675027978994055215633799328200162852362758888752053390597478057987049051888140420940046041671020291119834
9618801676120820476493282824887774890673285300537876417838867189143252632916574265784789365838354100871761640
0890193325768137944991587802067327122063093965016588415311665785766962764542640977640267523024099750740702900
5803991426315531819875420221211083174351573619936656402979851532403505562150036278053716479879766512325085072
6995521535010942659138033937358039415426614194851847382392600962252892759174330435692573276422891908666663512
4972402653958441907882700175192200121447619499702224598953687959865443752472973730617774193088937322353226330
8052774672760255302595944667374444996689881229923030796325067791266157267481

***

J-M Rebert wrote:

OEIS A088165  NSW primes: NSW numbers that are also prime. 

***

Ken Wilke wrote:

Comment: Let F(p) = r^2.= (p^2+1)//2. This can be rewritten as the Pell equation
p^2– 2*r^2 = -1. The first two solutions for this equation in positive integers are (p,r) = (1,1) and (7,5).
Additional solutions can be found by the recursion relations
p(n) = 6*p(n-1) – p(n-2) and r(n) = 6*r(n-1) – r(n-2)
Using the recursion relation p(n) = 6*p(n-1) – p(n-2), I wrote a small program in UBASIC to generate
value of p(n) and the corresponding values of F(p). After finding the values stated above, I found the
following additional values where p < 10^60 and p is prime:
p = 63018038201, F(p)= 44560482149^2
p= 489133282872437279 F(p) = 345869461223138161^2 = 3761^2*91962100830401^2
p=19175002942688032928599 F(p) =13558774610046711780701^2.
Primality checking was done with UBASIC’s RHO and ECM programs.

***

Mohamed Raja wrote:

Formula used investigate and find numbers mentioned below:  F(p)=(p^2+1)/2 to check if p is correct p=sqrt(2*(n^2)-1) - (n = result of F(p) equation)

p=1, (1^2+1)/2 = 1 = 1^2 (jk :D)

p=7, (7^2+1)/2 = 25 = 5^2

p=41, (41^2+1)/2 = 841 = 29^2

p=239, (239^2+1)/2 = 28561 = 13^4

p=9369319 = (9369319^2+1)/2 = 43892069261881 = 37^2 * 179057^2

p=63018038201 = (63018038201^2+1)/2 = 1985636569351347658201 = 44560482149^2

more numbers attached as Text File in email.

***

Adam Stinchombre wrote:

(p*2+1)/2 = x^2 leads to the Pell equation p^2-2x^2=-1.  The continued fraction for the square root of 2 leads to a recursive process for integer solutions. 
 I found several primes, including primes with size of 11, 18, 23, 63, 99, 161, 359, 363, 572, and 728 digits.  The last one is     
22675027978994055215
6337993282001628523627588887520533905974780579870490518881404209400460416710202911198349618801676120820
4764932828248877748906732853005378764178388671891432526329165742657847893658383541008717616400890193325
7681379449915878020673271220630939650165884153116657857669627645426409776402675230240997507407029005803
9914263155318198754202212110831743515736199366564029798515324035055621500362780537164798797665123250850
7269955215350109426591380339373580394154266141948518473823926009622528927591743304356925732764228919086
6666351249724026539584419078827001751922001214476194997022245989536879598654437524729737306177741930889
373223532263308052774672760255302595944667374444996689881229923030796325067791266157267481 

***

Simon wrote:

p=63018038201, F(p) = 1985636569351347658201 = 44560482149^2
Searched up to 24012000000001

***

Records   |  Conjectures  |  Problems  |  Puzzles