%I #19 Nov 24 2023 17:50:12
%S 5,6,9,21,44
%N Let phi(k) determine the x-coordinate and prime(k) the y-coordinate of the point A(k). Sequence gives values of n such that points A(n), A(n+1) and A(n+2) form a right triangle with right angle at A(n+1).
%C There are no more terms < 10^6. Triangles A(k), A(k+1), A(k+2) with an obtuse angle at A(k+1) seem to be less frequent than those with an acute angle, but also for large k (e.g., 999998) now and then an obtuse angle at A(k+1) occurs. So this line of thought does not provide an argument against the existence of further terms.
%C There are no more terms < 10^8. - _Sean A. Irvine_, Nov 24 2023
%e To verify that 5 is a term:
%e A(5) = [4,11];
%e A(6) = [2,13];
%e A(7) = [6,17];
%e square of leg A(5)--A(6) is (4-2)^2+(11-13)^2 = 4+4 = 8;
%e square of leg A(6)--A(7) is (2-6)^2+(13-17)^2 = 16+16 = 32;
%e square of leg A(5)--A(7) is (4-6)^2+(11-17)^2 = 4+36 = 40;
%e now 8 + 32 = 40 and the angle at A(6) is a right one.
%t p[ n_ ] := EulerPhi[ n ]; s[ n_ ] := Prime[ n ]; d[ x1_, y1_, x2_, y2_ ] := (x1 - x2)^2 + (y1 - y2)^2; Select[ Range[ 1, 10^6 ], d[ p[ # ], s[ # ], p[ # + 1 ], s[ # + 1 ] ] + d[ p[ # + 1 ], s[ # + 1 ], p[ # + 2 ], s[ # + 2 ] ] == d[ p[ # ], s[ # ], p[ # + 2 ], s[ # + 2 ] ] & ]
%o (PARI) {for(j=1,1000000,x0=eulerphi(j); x1=eulerphi(j+1); x2=eulerphi(j+2); y0=prime(j); y1=prime(j+1); y2=prime(j+2); k1=norml2([x0,y0]-[x1,y1]); k2=norml2([x1,y1]-[x2,y2]); h=norml2([x0,y0]-[x2,y2]); if(k1+k2==h,print1(j,",")))}
%Y Cf. A000010, A000040.
%K nonn,more
%O 1,1
%A _Joseph L. Pe_, Jan 22 2002
%E Edited by _Klaus Brockhaus_, Jun 03 2003