

A066901


Let phi(k) determine the xcoordinate and prime(k) the ycoordinate 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).


0




OFFSET

1,1


COMMENTS

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.


LINKS

Table of n, a(n) for n=1..5.


EXAMPLE

To verify that 5 is a term:
A(5) = [4,11];
A(6) = [2,13];
A(7) = [6,17];
square of leg A(5)A(6) is (42)^2+(1113)^2 = 4+4 = 8;
square of leg A(6)A(7) is (26)^2+(1317)^2 = 16+16 = 32;
square of leg A(5)A(7) is (46)^2+(1117)^2 =
4+36 = 40;
now 8 + 32 = 40 and the angle at A(6) is a right one.


MATHEMATICA

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 ] ] & ]


PROG

(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, ", ")))}


CROSSREFS

Sequence in context: A154311 A279702 A014980 * A273039 A019125 A019205
Adjacent sequences: A066898 A066899 A066900 * A066902 A066903 A066904


KEYWORD

nonn


AUTHOR

Joseph L. Pe, Jan 22 2002


EXTENSIONS

Edited by Klaus Brockhaus, Jun 03 2003


STATUS

approved



