 All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars  perplexus dot info  Prime and Twice Square (Posted on 2016-10-22) Determine all possible values of a prime number P such that each of P+1 and P2 + 1 is twice a perfect square.

Prove that these are the only ones.

 No Solution Yet Submitted by K Sengupta Rating: 3.5000 (2 votes) Comments: ( Back to comment list | You must be logged in to post comments.) re: A solution | Comment 3 of 4 | (In reply to A solution by Math Man)

No prime other than the one already mentioned has been found under 18.8 million (that's where my program was stopped). But of course that's not a proof.

Do
p = nxtprm(p)
DoEvents
pp1 = p + 1
sq = pp1 / 2
sr = Int(Sqr(sq) + 0.5)
If sr * sr = sq Then
sr1 = sr
p2p1 = p * p + 1
sq = p2p1 / 2
sr = Int(Sqr(sq) + 0.5)
If sr * sr = sq Then
Text1.Text = Text1.Text & p & Str(p + 1) & Str(p * p + 1) & "         "
Text1.Text = Text1.Text & Str((p + 1) / 2) & Str((p * p + 1) / 2) & "      "
Text1.Text = Text1.Text & sr1 & Str(sr) & crlf
End If
End If
Loop

 Posted by Charlie on 2016-10-22 15:54:41 Please log in:

 Search: Search body:
Forums (0)