Let $ABC$ be an equilateral triangle. From the vertex $A$ we draw a ray towards the interior of the triangle such that the ray reaches one of the sides of the triangle. When the ray reaches a side, it then bounces off following the law of reflection, that is, if it arrives with a directed angle $\alpha$, it leaves with a directed angle $180^{\circ}-\alpha$. After $n$ bounces, the ray returns to $A$ without ever landing on any of the other two vertices. Find all possible values of $n$.
Problem
Source: APMO 2018 P4
Tags: geometry, number theory, APMO, combinatorics, Hi
24.06.2018 05:09
The answer is all $n \equiv 1,5 \pmod 6$, with the exception of $5$ and $17$. As is usual, we will draw the equilateral grid obtained by reflecting the triangle repeatedly. We then impose coordinates on the grid such that $A = (0,0)$, $B = (1,0)$, $C = (0,1)$. The points corresponding to reflections of $A$ are then points $P = (a,b)$ such that $a \equiv b \pmod 3$. [asy][asy]size(13cm); pair A = (0,0); pair B = dir(0); pair C = dir(60); int M = 12; pair P(real x, real y) { return x*B + y*C; } pair X = P(4,7); label("$A$", A, dir(240), red); label("$B$", B, dir(-90)); label("$C$", C, dir(120)); label("$(a,b)$", X, dir(X), red); for (int i=0; i<=M; ++i) { draw(P(0,i)--P(M-i,i), grey); draw(P(i,0)--P(i,M-i), grey); draw(P(i,0)--P(0,i), grey); } draw(P(0,0)--X, red); for (int i=0; i<=M; ++i) { for (int j=0; j<=M-i; ++j) { if ((i-j)%3==0) dot(P(i,j), red+3); else dot(P(i,j), grey+2); if (i+j != M) { draw(shift(P(i,j))*(A--B--C--cycle), opacity(0.05)+green); } if (i*j != 0) { draw(shift(P(i,j))*rotate(180)*(A--B--C--cycle), opacity(0.05)+cyan); } } } [/asy][/asy] Observe that the condition about avoiding the other vertices amounts to having $\gcd(a,b) = 1$. Moreover, in going from $(0,0)$ to $(a,b)$ we pass exactly $(a-1) + (b-1) + (a+b-1) = 2(a+b) - 3$ sides, meaning $n = 2(a+b)-3$. It then follows we must have $\gcd(n,6) = 1$, since $n$ is odd, and $n \equiv 4a-3 \not\equiv 0 \pmod 3$ (since $a \equiv b \not\equiv 0 \pmod 3$). One can now check manually there are no working pairs for $n=5$ and $n=17$. We then provide constructions for remaining $n$: For $n = 6k-5$, take $P = (3k-2, 1)$. For $n = 12k-1$ take $P = (6k-5, 2)$. For $n = 24k+5$, take $P = (6k+5, 6k-1)$. For $n = 24k+17$, take $P = (6k+11, 6k-1)$.
24.06.2018 11:51
Similar idea: Iran 2007.
24.06.2018 21:46
16.12.2018 13:59
Hmm, this seems really hard to write up, especially given that I'm too lazy to draw hard diagrams. However, after reading the other solutions, mine is basically the same as v_Enhance's. We claim the answer is all $n\equiv 1,5\pmod{6}$, but not $5$ or $17$. Use the standard trick to turn this into a problem about a triangular grid, where all the vertices are labeled either A,B, or C, such that each triangle has 3 distinct labels. Then, our ray is just a line from some A to another A that doesn't pass through any other vertices. Let the origin be the starting point. Now, apply suitable transformation in the dihedral group of order $6$ so that the ending point has polar angle $\theta$ between $0$ and $60^\circ$. Now, apply an affine transformation so that we have a grid that looks like: [asy][asy] int m=6,n=6; for(int i = 0; i < m; ++i) { for(int j = 0; j < n; ++j) { if((i-j)%3==0)dot("$A$",(i, j),dir(45)); if((i-j)%3==1)dot("$B$",(i, j),dir(45)); if((i-j)%3==2)dot("$C$",(i, j),dir(45)); if(i < m-1) draw((i, j)--(i + 1, j)); if(j < n-1)draw((i, j)--(i, j + 1)); if(i<m-1 && j>0) draw((i,j)--(i+1,j-1)); } } [/asy][/asy] Here the bottom left is $(0,0)$ and is the starting $A$, and the ending square is some $(x,y)$ with $x,y\ge 0$. It is easy to see that the only $(x,y)$ that are labeled $A$ are the ones with $3\mid x-y$. To not pass through any other vertices, we want $\gcd(x,y)=1$. Let us now compute the number of intersections with the segments. The number of intersections with vertical segments is $x-1$ and with horizontal segments is $y-1$. It now remains to find the number of intersections with tilted segments. Because the path has positive slope, we see that the number of intersections with tilted segments is the same as the number of unit squares the path enters. We see that whenever the path intersects a vertical or horizontal segment, it enters a new unit square. Therefore, the number of unit squares the path touches is $1+(x-1)+(y-1)=x+y-1$, where the $1$ is there because the path starts in a unit square. Thus, the total number of intersections is $2(x+y)-3$. Thus, it suffices to find all $n$ which can be expresses in the form $2(x+y)-3$ with $\gcd(x,y)=1$ and $3\mid x-y$. We will first find all positive numbers $m$ that can be expressed in the form $x+y$ for $x,y\ge 1$, $\gcd(x,y)=1$, and $3\mid x-y$. First, we claim that all $m\equiv 2\pmod{3}$ can be achieved. This is done by setting $y=1$, and then noting that $x=3k+1$ works for any $k\ge 0$. We now claim that all $m\equiv 1\pmod{6}$ and $m>1$ can be achieved. This is done by setting $y=2$ and noting that any $x=3(2k+1)+2$ for $k\ge 0$ works. We now claim that $m\equiv 4\pmod{12}$ and $m>4$ can be achieved. This is done by setting $x=6k+5$ and $y=6k+11$. Also, $m\equiv 10\pmod{12}$ with $m>10$ can be achieved by setting $x=6k+5$ and $y=6k+17$. Combining all cases, we see that any positive integer $m\equiv 1,2\pmod{3}$ and $m\ne 1,4,10$ can be achieved. We can also check by brute force that $x+y=1,4,10$, $x,y\ge 1$, and $3\mid x-y$ implies $\gcd(x,y)\ne 1$. Therefore, the all $m\equiv 1,2\pmod{3}$ besides $1,4,10$ can be achieved, so all positive integers $n\equiv 1,5\pmod{6}$ besides $2\cdot 1-3,2\cdot 4-3,2\cdot 10-3$ can be achieved, as desired.
11.02.2019 04:36
v_Enhance wrote: The answer is all $n \equiv 1,5 \pmod 6$, with the exception of $5$ and $17$. As is usual, we will draw the equilateral grid obtained by reflecting the triangle repeatedly. We then impose coordinates on the grid such that $A = (0,0)$, $B = (1,0)$, $C = (0,1)$. The points corresponding to reflections of $A$ are then points $P = (a,b)$ such that $a \equiv b \pmod 3$. [asy][asy]size(13cm); pair A = (0,0); pair B = dir(0); pair C = dir(60); int M = 12; pair P(real x, real y) { return x*B + y*C; } pair X = P(4,7); label("$A$", A, dir(240), red); label("$B$", B, dir(-90)); label("$C$", C, dir(120)); label("$(a,b)$", X, dir(X), red); for (int i=0; i<=M; ++i) { draw(P(0,i)--P(M-i,i), grey); draw(P(i,0)--P(i,M-i), grey); draw(P(i,0)--P(0,i), grey); } draw(P(0,0)--X, red); for (int i=0; i<=M; ++i) { for (int j=0; j<=M-i; ++j) { if ((i-j)%3==0) dot(P(i,j), red+3); else dot(P(i,j), grey+2); if (i+j != M) { draw(shift(P(i,j))*(A--B--C--cycle), opacity(0.05)+green); } if (i*j != 0) { draw(shift(P(i,j))*rotate(180)*(A--B--C--cycle), opacity(0.05)+cyan); } } } [/asy][/asy] Observe that the condition about avoiding the other vertices amounts to having $\gcd(a,b) = 1$. Moreover, in going from $(0,0)$ to $(a,b)$ we pass exactly $(a-1) + (b-1) + (a+b-1) = 2(a+b) - 3$ sides, meaning $n = 2(a+b)-3$. It then follows we must have $\gcd(n,6) = 1$, since $n$ is odd, and $n \equiv 4a-3 \not\equiv 0 \pmod 3$ (since $a \equiv b \not\equiv 0 \pmod 3$). One can now check manually there are no working pairs for $n=5$ and $n=17$. We then provide constructions for remaining $n$: For $n = 6k-5$, take $P = (3k-2, 1)$. For $n = 12k-1$ take $P = (6k-5, 2)$. For $n = 24k+5$, take $P = (6k+5, 6k-1)$. For $n = 24k+17$, take $P = (6k+11, 6k-1)$. Nice Solution
23.02.2019 06:11
I didn't get how in a periodic orbit vertex coordinate is $ x \equiv y mod 3$
31.05.2019 10:44
Really liked this problem. Like others, the answer is $n \equiv 1, 5 \ ( \text{mod} \ 6) $, except $5$ and $17$. Now, like other solutions as well, we reflect the triangle instead of reflect the ray. (Thus, the ray could just go to a straight line) Now, I'll borrow the diagram on #5 yayups wrote: Now, apply an affine transformation so that we have a grid that looks like: [asy][asy] int m=6,n=6; for(int i = 0; i < m; ++i) { for(int j = 0; j < n; ++j) { if((i-j)%3==0)dot("$A$",(i, j),dir(45)); if((i-j)%3==1)dot("$B$",(i, j),dir(45)); if((i-j)%3==2)dot("$C$",(i, j),dir(45)); if(i < m-1) draw((i, j)--(i + 1, j)); if(j < n-1)draw((i, j)--(i, j + 1)); if(i<m-1 && j>0) draw((i,j)--(i+1,j-1)); } } [/asy][/asy] Let $A = (0,0)$ and other lattice points be denoted $A$ if and only if $3 | x - y$. Now, we first just consider the square (without the whole diagonal), we know that from the left - bottom most A to other A, it must form a rectangular array $a \times b$, where $(a,b) = 1$, or else it passes through another point. It is quite well known that the number of regions passed is $a + b - (a,b) $ , which is $a + b - 1$. Now, since there are diagonals there, then the total number of regions will be $2(a + b - 1)$, resulting passing through $2(a + b - 1) - 1$ edge. Notive that the two As we mentioned must be at $(0,0)$ and $(x,y)$ where $3 | x - y$, as well as $(x,y) = 1$. Thus, there are $2(x + y) - 3$ edge passed. WLOG $x > y$. We could write $x = y + 3k$. Thus, there must be $2(2y + 3k) - 3 = (4y - 3) + 6k$ edge passed. So all such $n$ must be either $1$ or $5$ modulo 6. Firstly, 5 won't work as this will result $x + y = 4$, The only possible pair is $(2,2)$ which doesn't satisfy $(x,y) = 1$. 17 won't work as this will result $x + y = 10$. The only possible pairs are $(2,8), (5,5), (8,2)$. None of this results $(x,y) = 1$. For other $n$, consider the following construction: For $n = 6k + 1$, take $(x,y) = (1, 3k + 1)$. For $n = 12k + 11$, take $(x,y) = (2, 6k + 5)$ For $n = 24k + 5$, take $(x,y) = (6k + 5,6k - 1)$ For $n = 24k + 17$, take $(x,y) = (6k + 11, 6k - 1)$.
26.08.2019 12:18
An improvisation- Find the distance traveled by the Ray, if it can go to any of the vertices.
27.08.2019 21:13
@above it will just use pythagorus to get the answer .
22.10.2019 07:09
What an amazing problem! Irrational_phi wrote: Let $ABC$ be an equilateral triangle. From the vertex $A$ we draw a ray towards the interior of the triangle such that the ray reaches one of the sides of the triangle. When the ray reaches a side, it then bounces off following the law of reflection, that is, if it arrives with a directed angle $\alpha$, it leaves with a directed angle $180^{\circ}-\alpha$. After $n$ bounces, the ray returns to $A$ without ever landing on any of the other two vertices. Find all possible values of $n$. We claim that all the numbers of the form $6k \pm 1$ except $5,17$ are the only working values of $n.$ Firstly, unwrap the equilateral triangle to get an equilateral triangle grid. Let the positions of $A$ after reflections be marked as $A_1,A_2,\cdots.$ Hence, the light ray becomes a straight line segment $\ell$ joining $AA_i$ not passing through any other "lattice" point. Then $n$ becomes the number of sides the segment $\ell$ intersects. [asy][asy] /* Geogebra to Asymptote conversion, documentation at artofproblemsolving.com/Wiki go to User:Azjps/geogebra */ import graph; size(9cm); real labelscalefactor = 0.5; /* changes label-to-point distance */ pen dps = linewidth(0.7) + fontsize(10); defaultpen(dps); /* default pen style */ pen dotstyle = black; /* point style */ real xmin = -9.545074432077003, xmax = 9.639079665694172, ymin = -9.087631366703842, ymax = 3.2698113775312843; /* image dimensions */ pen ffwwzz = rgb(1,0.4,0.6); pen ccqqqq = rgb(0.8,0,0); pen qqzzff = rgb(0,0.6,1); draw((-2.825307610226197,2.0515194389457307)--(-8.21461093915967,-7.537818892177361)--(2.7846513255435363,-7.410423318172245)--cycle, linewidth(0.4) + ffwwzz); draw((-2.825307610226197,2.0515194389457307)--(-2.725009607118806,-6.608153782982024)--(0.2747891923457037,-6.573409535526088)--cycle, linewidth(0.3) + blue); draw((-2.825307610226197,2.0515194389457307)--(-2.7751586086725015,-2.2783171720181485)--(-1.2752592089402461,-2.260945048290178)--cycle, linewidth(0.3) + qqzzff); /* draw figures */ draw((-2.825307610226197,2.0515194389457307)--(-8.21461093915967,-7.537818892177361), linewidth(0.4) + ffwwzz); draw((-8.21461093915967,-7.537818892177361)--(2.7846513255435363,-7.410423318172245), linewidth(0.4) + ffwwzz); draw((2.7846513255435363,-7.410423318172245)--(-2.825307610226197,2.0515194389457307), linewidth(0.4) + ffwwzz); draw((-7.724674272892987,-6.6660608620752555)--(2.274655058655379,-6.550246703888794), linewidth(0.3)); draw((1.7646587917672212,-5.69007008960534)--(-7.234737606626307,-5.794302831973156), linewidth(0.3)); draw((-6.744800940359628,-4.922544801871056)--(1.254662524879064,-4.829893475321889), linewidth(0.3)); draw((0.7446662579909058,-3.9697168610384357)--(-6.2548642740929505,-4.05078677176896), linewidth(0.3)); draw((-5.764927607826273,-3.179028741666864)--(0.234669991102749,-3.1095402467549835), linewidth(0.3)); draw((-0.27532627578540864,-2.249363632471532)--(-5.274990941559594,-2.3072707115647653), linewidth(0.3)); draw((-4.785054275292914,-1.435512681462667)--(-0.7853225426735646,-1.3891870181880819), linewidth(0.3)); draw((-1.2953188095617199,-0.529010403904634)--(-4.295117609026235,-0.5637546513605667), linewidth(0.3)); draw((-3.8051809427595558,0.3080033787415324)--(-1.805315076449876,0.33116621037881666), linewidth(0.3)); draw((-3.3152442764928765,1.179761408843631)--(-2.31531134333804,1.191342824662279), linewidth(0.3)); draw((-7.214678006004824,-7.526237476358716)--(-7.724674272892987,-6.6660608620752555), linewidth(0.3)); draw((-7.234737606626307,-5.794302831973156)--(-6.214745072849985,-7.514656060540068), linewidth(0.3)); draw((-6.744800940359628,-4.922544801871056)--(-5.214812139695151,-7.503074644721421), linewidth(0.3)); draw((-6.2548642740929505,-4.05078677176896)--(-4.214879206540317,-7.491493228902773), linewidth(0.3)); draw((-5.764927607826273,-3.179028741666864)--(-3.2149462733854843,-7.479911813084127), linewidth(0.3)); draw((-5.274990941559594,-2.3072707115647653)--(-2.215013340230647,-7.46833039726548), linewidth(0.3)); draw((-4.785054275292914,-1.435512681462667)--(-1.2150804070758119,-7.456748981446832), linewidth(0.3)); draw((-0.21514747392097403,-7.445167565628186)--(-4.295117609026235,-0.5637546513605667), linewidth(0.3)); draw((-3.8051809427595558,0.3080033787415324)--(0.7847854592338622,-7.433586149809539), linewidth(0.3)); draw((1.7847183923886996,-7.4220047339908914)--(-3.3152442764928765,1.179761408843631), linewidth(0.3) + ccqqqq); draw((-7.214678006004824,-7.526237476358716)--(-2.31531134333804,1.191342824662279), linewidth(0.3) + ccqqqq); draw((-1.805315076449876,0.33116621037881666)--(-6.214745072849985,-7.514656060540068), linewidth(0.3)); draw((-5.214812139695151,-7.503074644721421)--(-1.2953188095617199,-0.529010403904634), linewidth(0.3)); draw((-0.7853225426735646,-1.3891870181880819)--(-4.214879206540317,-7.491493228902773), linewidth(0.3)); draw((-3.2149462733854843,-7.479911813084127)--(-0.27532627578540864,-2.249363632471532), linewidth(0.3)); draw((-2.215013340230647,-7.46833039726548)--(0.234669991102749,-3.1095402467549835), linewidth(0.3)); draw((-1.2150804070758119,-7.456748981446832)--(0.7446662579909058,-3.9697168610384357), linewidth(0.3)); draw((-0.21514747392097403,-7.445167565628186)--(1.254662524879064,-4.829893475321889), linewidth(0.3)); draw((0.7847854592338622,-7.433586149809539)--(1.7646587917672212,-5.69007008960534), linewidth(0.3)); draw((1.7847183923886996,-7.4220047339908914)--(2.274655058655379,-6.550246703888794), linewidth(0.3)); draw((-2.825307610226197,2.0515194389457307)--(-4.275058008404757,-2.2956892957461186), linewidth(0.3)); draw((-2.825307610226197,2.0515194389457307)--(-5.74486800720479,-4.910963386052419), linewidth(0.3)); draw((-2.825307610226197,2.0515194389457307)--(-2.725009607118806,-6.608153782982024), linewidth(0.3) + blue); draw((-2.725009607118806,-6.608153782982024)--(0.2747891923457037,-6.573409535526088), linewidth(0.3) + blue); draw((0.2747891923457037,-6.573409535526088)--(-2.825307610226197,2.0515194389457307), linewidth(0.3) + blue); draw((-2.825307610226197,2.0515194389457307)--(-2.7751586086725015,-2.2783171720181485), linewidth(0.3) + qqzzff); draw((-2.7751586086725015,-2.2783171720181485)--(-1.2752592089402461,-2.260945048290178), linewidth(0.3) + qqzzff); draw((-1.2752592089402461,-2.260945048290178)--(-2.825307610226197,2.0515194389457307), linewidth(0.3) + qqzzff); /* dots and labels */ dot((-2.825307610226197,2.0515194389457307),dotstyle); dot((-8.21461093915967,-7.537818892177361),dotstyle); dot((2.7846513255435363,-7.410423318172245),dotstyle); dot((-2.8052480096047163,0.31958479456017447),dotstyle); dot((-2.7851884089832395,-1.4123498498253746),dotstyle); dot((-2.7651288083617627,-3.144284494210925),dotstyle); dot((-2.745069207740282,-4.876219138596479),dotstyle); dot((-2.725009607118806,-6.608153782982024),dotstyle); dot((-4.275058008404757,-2.2956892957461186),dotstyle); dot((-5.74486800720479,-4.910963386052419),dotstyle); dot((-7.21467800600482,-7.526237476358713),dotstyle); dot((-4.25499840778328,-4.027623940131667),dotstyle); dot((-5.7248084065833025,-6.642898030437962),dotstyle); dot((-4.214879206540319,-7.491493228902775),dotstyle); dot((-4.234938807161802,-5.759558584517216),dotstyle); dot((-1.235140007697291,-5.724814337061278),dotstyle); dot((-1.2150804070758106,-7.456748981446834),dotstyle); dot((0.2747891923457037,-6.573409535526088),dotstyle); dot((-1.2551996083187686,-3.992879692675728),dotstyle); dot((-1.2752592089402461,-2.260945048290178),dotstyle); dot((0.2547295917242264,-4.841474891140535),dotstyle); dot((1.7847183923886998,-7.422004733990892),dotstyle); dot((-7.234737606626309,-5.794302831973156),dotstyle); dot((-5.764927607826272,-3.179028741666864),dotstyle); dot((0.2346699911027487,-3.1095402467549835),dotstyle); dot((1.764658791767221,-5.69007008960534),dotstyle); dot((-4.295117609026235,-0.5637546513605667),dotstyle); dot((-1.2953188095617194,-0.5290104039046339),dotstyle); clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle); /* end of picture */ [/asy][/asy] For each small triangle, let $2b$ be the side and $h$ be its height. Let $A$ be $(0,0).$ We make some simple observations: Fix a depth $d=kh$ below $A.$ Then pick any point $T$ on the line at this depth. Then $AT$ intersects exactly $2k-3$ lines if it doesn't pass through any lattice point. Let $T(xb,yh)$ be a point. A segment $AT$ passes through another lattice point if and only if $\gcd (x,y)>1$ and $(x/d,y/d)$ is a valid point for some $d \mid \gcd.$ In particular, $x/d,y/d$ must have the same parity. Now, let $A_i$ be at depth $kh.$ Then $A_i$ is of the form $((6r+3)b,-(2k+1)h).$ If $3 \mid k,$ then $3$ divides both and the point obtained on dividing by $3$ is a valid point, so we must have $3 \nmid k.$ Hence $n=2k-3$ becomes of the form $6k \pm 1.$ Manually rule of $5,17.$ Also, To show $6k+1$ works, pick any $A_i$ on the two big slanting lines just below $A.$ For $6k-1$ with odd $k,$ consider $A_i$ of the form $(3kb,-(3k+4)h).$ For $6k-1$ with even $k,$ consider $A_i$ of the form $(3kb, -(3k+10)h).$ Hence we are done. $\blacksquare$
19.02.2021 11:50
The answer is all $n=6k+1,n=6k+5$ except $n=5,17$. Suppose the points are $P_1,P_2,...,P_{n}$ and define $P_0=A$ and the equilateral triangle has side length $1$ Let $M$ be the midpoint of $BC$, let $BP=t$, notice that $n=1$ if and only if $t=\frac{1}{2}$. Hence WLOG assume $t<\frac{1}{2}$. Let $\theta=\angle P_1AC$ and for each $i$ let $\theta_i$ be the angle made by $P_iP_{i-1}$ and the side which $P_i$ lies on. Also we say $i$ is a good position if $P_{i-1}$ and $P_{i+1}$ lies on different side, and bad if they lie on the same side, for example, in the following diagram, $3,5$ is bad while all other points are good. [asy][asy] size(8cm); real labelscalefactor = 0.5; /* changes label-to-point distance */pen dps = linewidth(0.7) + fontsize(0); defaultpen(dps); /* default pen style */ pen dotstyle = black; /* point style */ real xmin = -21.773169980469564, xmax = 23.043675040535412, ymin = -25.011478487118808, ymax = 12.787782260134506; /* image dimensions */pen zzttqq = rgb(0.6,0.2,0); draw((1.3130873746566645,8.322046813201624)--(-13.280298103713285,-16.997078265391046)--(15.943400155128613,-16.975758277582017)--cycle, linewidth(2) + zzttqq); /* draw figures */draw((1.3130873746566645,8.322046813201624)--(-13.280298103713285,-16.997078265391046), linewidth(2) + zzttqq); draw((-13.280298103713285,-16.997078265391046)--(15.943400155128613,-16.975758277582017), linewidth(2) + zzttqq); draw((15.943400155128613,-16.975758277582017)--(1.3130873746566645,8.322046813201624), linewidth(2) + zzttqq); draw((1.3130873746566645,8.322046813201624)--(-2.175152845410283,-16.98897656794579), linewidth(0.8),EndArrow(6)); draw((-2.175152845410283,-16.98897656794579)--(-4.335783299308767,-1.4785894653996028), linewidth(0.8),EndArrow(6)); draw((-4.335783299308767,-1.4785894653996026)--(4.824222345222871,2.2508158377861465), linewidth(0.8),EndArrow(6)); draw((4.824222345222871,2.2508158377861465)--(-7.90330379527501,-7.668140052663438), linewidth(0.8),EndArrow(6)); draw((-7.90330379527501,-7.668140052663438)--(-9.188560587646151,-16.994093160864313), linewidth(0.8),EndArrow(6)); draw((-9.188560587646151,-16.994093160864313)--(-9.984653973274188,-11.279225744000811), linewidth(0.8),EndArrow(6)); /* dots and labels */dot((1.3130873746566645,8.322046813201624),dotstyle); label("$A$", (1.0738515471424028,9.358735399096757), NE * labelscalefactor); dot((-13.280298103713285,-16.997078265391046),dotstyle); label("$B$", (-14.835330982555982,-18.153384765043313), NE * labelscalefactor); dot((15.943400155128613,-16.975758277582017),dotstyle); label("$C$", (17.062779352678877,-18.073639489205227), NE * labelscalefactor); dot((1.3315510257076637,-16.98641827148653),linewidth(4pt) + dotstyle); label("$M$", (1.4725779263328385,-18.631856420071834), NE * labelscalefactor); dot((-2.175152845410283,-16.98897656794579),dotstyle); label("$P_1$", (-2.674176417247693,-18.631856420071834), NE * labelscalefactor); dot((-4.335783299308767,-1.4785894653996026),linewidth(4pt) + dotstyle); label("$P_2$", (-5.903860088690222,-0.8486599081783992), NE * labelscalefactor); dot((-4.335783299308768,-1.4785894653996041),linewidth(4pt) + dotstyle); dot((4.824222345222871,2.2508158377861465),linewidth(4pt) + dotstyle); label("$P_3$", (5.818695459508588,2.6202595907783923), NE * labelscalefactor); dot((-7.90330379527501,-7.668140052663438),linewidth(4pt) + dotstyle); label("$P_4$", (-9.093671122213708,-6.789682958115892), NE * labelscalefactor); dot((4.82422234522287,2.2508158377861465),linewidth(4pt) + dotstyle); dot((-9.188560587646151,-16.994093160864313),linewidth(4pt) + dotstyle); label("$P_5$", (-9.4525248634851,-18.472365868395663), NE * labelscalefactor); dot((-9.984653973274188,-11.279225744000811),linewidth(4pt) + dotstyle); label("$P_6$", (-11.56577467319441,-10.816819387939294), NE * labelscalefactor); clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle); [/asy][/asy] Claim. $\theta_{2i+1}=120^{\circ}-\theta$ for all $i$ We proceed by induction on $i$, the case $i=0$ is obvious. Suppose $\theta_{2i-1}=120^{\circ}-\theta$. Case 1: $2i-1$ is good, WLOG assume $P_{2i-2},P_{2i-1},P_{2i}$ lies on $AC,BC,AB$ respectively. then $\triangle P_{2i-2}P_{2i-1}C\sim\triangle P_{2i-1}P_{2i}B$ Hence $\theta_{2i}=\theta$, and so $2i$ is good, which implies $\theta_{2i+1}=120^{\circ}-\theta$ as well. Case 2: $2i-1$ is bad, take $i=2$ in the figure as an example, By easy angle chasing we have $\theta_4=60^{\circ}-\theta$, $\theta_5=120^{\circ}-\theta$, $\theta_6=\theta$ and so $\theta_7=120^{\circ}-\theta$ as desired. $\blacksquare$ In particular, this implies all even numbers are good. Hence $n$ is odd. Moreover, $P_{n-1}$ and $P_1$ are reflections across $M$. We call a point $P$ $x$-counterclockwise from $A$ if $P$ is a point on segment $AB$ where $PA=x$, and define similarly for clockwise and other vertices. For an integer $n$, define $$f(n)=\begin{cases}C,&\text{ if }n\equiv 1\pmod 3\\ A,&\text{ if }n\equiv 2\pmod 3\\ B,&\text{ if }n\equiv 0\pmod 3\end{cases}$$Claim 2. For all $i$ $$P_{2i-1} \text{ is }\begin{cases}1-\{it\},&\text{clockwise from }f(n)\text{ if }\lfloor it\rfloor\text{ is even }\\ \{it\}, &\text{counterclockwise from }f(n)\text{ if }\lceil it\rceil\text{ is even}\end{cases}$$Proof. The main idea is that (taking the figure as an example), $$\frac{AP_3+BP_5}{AB}=\frac{AP_3}{BP_5}=\frac{BP_5}{BP_4}=t$$Hence $AP_3+BP_5=1-t$, and similarly $BP_1+AP_3=1-t$. The rest are just some straightforward induction. $\blacksquare$ Now, if $i\equiv 2\pmod 3$ then $P_{2i+1}$ lies on either $AB$ or $AC$, and in particular can't be the reflection of $P_1$ across $M$. If $n=5$ then we need to find values of $t$ such that $\lfloor{it}\rfloor$ is odd and $1-\{3t\}=t$, which gives no solution. Otherwise, for $n=6k+1$ it suffices to find $t$ such that \begin{align*} 1-\{(3k+1)t\}&=t\\ \lfloor (3k+1)t\rfloor &\equiv 0\pmod 2 \end{align*}Indeed, it suffices to take $t=\frac{1}{3k+2}$. For $n=6k+5$ it suffices to find $t$ such that \begin{align*} \{3(k+1)t\}&=t\\ \lfloor 3(k+1)t\rfloor&\equiv 1\pmod 2 \end{align*}Indeed, it suffices to take $t=\frac{1}{3k+2}$. This completes the proof.
15.05.2022 15:05
The answer is $n \equiv 1,5 \pmod{6}$, and $n \neq 5,17$. Use the standard "reflection trick" to draw an equilateral triangular grid from reflecting the triangle, and label each vertex on the grid to be $A$, $B$, or $C$ based on this. Now, apply the suitable affine transformation which transforms the grid to look like this, with the bottom left corner labeled $(0,0)$ (with our ray being colored in red): yayups wrote: [asy][asy] int m=6,n=6; for(int i = 0; i < m; ++i) { for(int j = 0; j < n; ++j) { if((i-j)%3==0)dot("$A$",(i, j),dir(45)); if((i-j)%3==1)dot("$B$",(i, j),dir(45)); if((i-j)%3==2)dot("$C$",(i, j),dir(45)); if(i < m-1) draw((i, j)--(i + 1, j)); if(j < n-1)draw((i, j)--(i, j + 1)); if(i<m-1 && j>0) draw((i,j)--(i+1,j-1)); } } draw((0,0)--(2,5),red); [/asy][/asy] It's easy to see that a point $(x,y)$ is labeled $A$ iff $3 \mid x-y$, so we want to start from $(0,0)$ and end at $(x,y)$ with $x,y \geq 1$ and $3 \mid x-y$. For the ray not to hit any other vertices first, we require $\gcd(x,y)=1$. Now, it is clear that the ray crosses a vertical segment $x-1$ times and a horizontal segment $y-1$ times. Further, because the ray has positive slope, the number of times it crosses a diagonal segment is equal to the number of squares the ray enters. As $\gcd(x,y)=1$, this is simply equal to $x+y-1$, so in total we have $2(x+y)-3$ intersections, corresponding to that many bounces. Thus the problem becomes one of number theory: Restated problem wrote: Find all $n$ such that there exist positive coprime integers $x,y$ such that $3 \mid x-y$ and $n=2(x+y)-3$. Then, we must have $\gcd(n,6)=1$, since $n$ is always odd and if $3 \mid n$, then $3 \mid x-y,x+y$, hence $3 \mid x,y$, contradicting $\gcd(x,y)=1$. We can now manually verify that $n=5,17$ fail. Now, for all the other $n$, we have the following constructions (where $k>0$): For $n=6k-5$, let $(x,y)=(3k-2,1)$ For $n=12k-1$, let $(x,y)=(6k-1,2)$ For $n=24k+5$, take $(x,y)=(6k+5,6k-1)$ For $n=24k+17$, take $(x,y)=(6k+11,6k-1)$ This finishes the problem. $\blacksquare$
17.12.2022 07:11
Here is a non-constructive solution proving that all $6k+5$ greater than $17$ are valid for people that are too stupid like me. Note that $n$ can take the value $2(a+b)-3$ for any $a$ and $b$ such that $a\equiv b\pmod 3$ and $\gcd(a,b)=1$. If $n=6k+5$, then $a+b\equiv 1\pmod 3$ and thus $a\equiv b\equiv 2\pmod 3$. So it suffices to prove that there exist two relatively prime positive integers that are $2\pmod 3$ and sum to every $1\pmod 3$ integer greater than $10$. Suppose there existed a $c$ such that for any $a$ and $b$ that are $2\pmod 3$ summing to $c$, $\gcd(a,b)>1$. Then for any such $a$, $\gcd(a,c-a)=\gcd(a,c)>1$. Therefore $c$ is divisible by any $2\pmod 3$ prime less than $c$. Let these primes be $p_1$, $p_2$, $\dots$, $p_k$. Since $c$ is divisible by all of these primes, $c\ge p_1p_2\cdots p_k$. However, we prove that there exists a different $2\pmod 3$ prime $p_{k+1}$ such that $p_{k+1}<p_1p_2\cdots p_k$, meaning that such a $c$ cannot exist (because then $c$ must be divisible by $p_{k+1}$, allowing the existence of a prime $p_{k+2}<c$, etc.) Let $\gamma=p_1p_2\cdots p_k$. Consider the numbers $d$ less than $3\gamma$ such that $d\equiv 2\pmod 3$ and $d$ is not divisible by any of the primes. If there wasn't a $p_{k+1}$ then all of these $d$s must be greater than $\gamma$, because any $d$ has a prime factor that is $2 \pmod 3$. If $\gamma\equiv 2\pmod 3$ then $d=\gamma-3$ would be a contradiction. Therefore $\gamma \equiv 1\pmod 3$. Now if there was a $e$ such that $\gamma < e < 2\gamma$ such that $3\mid e$ and $e$ wasn't divisible by any of the primes, then $e-\gamma$ would be a contradiction. Thus for any $\gamma < e < 2 \gamma$ and $3\mid e$, there exists a prime $p_i$ that divides $e$, and thus $e/3$, which is between $\gamma/3$ and $2\gamma/3$. But by Bertrand's postulate there exists a prime in this range, which means there must be a $p_i$ between $\gamma/3$ and $2\gamma/3$. This only happens in the case $\gamma=2$ or $10$, which forces $c\le 10$.
15.02.2023 03:29
The answer is all $n \equiv 1, 5 \pmod 6$ except for $5$ and $17$. The idea is to consider the reflection as actually reflecting the equilateral triangle across the side the path bounces off. Then, any such path is a straight line in the tesselation of the plane with these equilateral triangles. In other words, it suffices to find all $n$ such that a straight segment in this tesselation between two image points of the starting vertex crosses exactly $n$ lines, barring endpoints. First, note that all images of the starting vertex form themselves an equilateral triangle tesselation of the plane. In particular, supposing that the equilateral triangle has side length 1, two of the vectors between two of these images are $1+\omega$ and $1-\omega^2 = 2-\omega$, respectively, where $\omega$ is a sixth root of unity. Therefore, the vector the path defines can be written as $a(1+\omega) + b(2-\omega) = (a+2b)+(a-b)\omega$ for some nonnegative $a, b$. Now, assume without loss of generality that $a, b$ are positive and $a \geq b$. (If any $n$ was reachable otherwise, we can reflect that path over a suitable line.) Then, notice that it crosses $a+2b-1$ lines oriented in direction $\omega$, $a-b-1$ lines oriented in direction $1$, and $3a+b-1$ lines oriented in direction $\omega^2$. As a result, the total number of lines is $$n = 2(2a+b) - 3.$$Note that this obviously must be odd. On the other hand, $2a+b \equiv b-a \pmod 3$, and if $a \equiv b \pmod 3$, both $a+2b$ and $a-b$ are multiples of $3$, which implies that the path crosses some intermediate vertex, contradiction. This proves that $n \equiv 1, 5\pmod 6$ is necessary. On the other hand, a construction is easy for $n \equiv 5, 17$, say by a Chicken McNugget argument.
08.03.2023 21:19
Answer is all $n \equiv 1, 5 \pmod 6$ except $5, 17$. Notice by observation of the tiling billiard that it suffices to find the set of integers representable as $2a + 2b - 3$ for $a, b$ coprime and not multiples of $3$ and equivalent mod $3$. Rearrange to get $4a + 6k - 3$ for $3 \nmid a$ and $\gcd(a, k) = 1$. All evens are impossible. $3 \pmod 6$ is obviously impossible. Now notice one of $k = 0, k = 2, k = 4$ always ends the adventure if $3$ does not divide the desired number, so we are done. For numbers which are at least $25$. Smaller numbers finish by case check.
03.05.2023 17:53
Let we define a coordinate system with basis vectors with angle between them $60^{\circ}$. Let $A$ be point $(0,0)$, $B$ be $(1,0)$ and $C$ be $(0,1)$. Our original problems becomes: For which $n$ there exist a point $Z$ with coordinates $(x,y)$, such that $\blacksquare$ $x-y\equiv0\pmod{3}$ and $\blacksquare$ There is no other lattice point on the segment $AZ$ $\blacksquare$ $AZ$ intersects exactly $n$ sides The third condition gives us that $\gcd{x, y}=0$. Now let we see how many sides does $AZ$ intersects? \[(x-1)+(y-1)+(x+y-1)=2(x+y)-3=n\] But $2(x+y)-3$ is coprime with $6$ we can only have $n\equiv\pm1\pmod{6}$. We can check that for $n=5$ and $n=17$ there is no such $Z$. Now for larger $n$ we have these examples: $\blacksquare$ For $n=6k-5$, $Z=(3k-2, 1)$. $\blacksquare$ For $n=12k-1$, $Z=(6k-5, 2)$. $\blacksquare$ For $n=24k+5$, $Z=(6k+5, 6k-1)$. $\blacksquare$ For $n=24k+17$, $Z=(6k+11, 6k-1)$.
14.10.2023 05:37
We will show that the answer is all $n \equiv 1 \pmod{6}$ and all $n \equiv 5 \pmod{6}$ except for $5,17.$ Construct a coordinate system with $A=(0,0),B=(1,0),C=(1,1).$ Consider reflecting the triangle repeatedly, constructing a triangular lattice with $A$ as its vertex and bounded by lines $y=0$ and $x=y.$ We can check that all points that are images of $A$ satisfy $x+y \equiv 0 \pmod{3}.$ Now, we may represent the reflections as drawing a segment between $A$ and some image of $A.$ We see that this path does not land on another vertex if the segment does not pass through a lattice point, which happens if and only if $x,y$ are relatively prime. Now we may count the number of bounces as the number of intersections between a segment and a lattice line. A line from $(0,0)$ to $(a,b)$ intersects $a-1$ lines of the form $x=k, b-1$ lines of the form $y=k$ and $a-b-1$ lines of the form $x-y=k,$ so it intersects $2a-3$ lines total. Thus, our problem is reduced to finding all $a$ such that there exists a $k$ with $a \ge k, \gcd{(a,k)}=1$ and $a+k \equiv 0 \pmod{3},$ and for each $a,$ we get a corresponding $n=2a-3.$ First, if $a \equiv 0 \pmod{3}$ then we must have $k \equiv 0 \pmod{3},$ but that contradicts our relatively prime assumption, so there are no solutions in this case. If $a \equiv 2 \pmod{3},$ we may choose $k=1$ which always works. If $a \equiv 1 \pmod{3}$ and $a \ge 13,$ we may choose $k=2$ when $a \equiv 1 \pmod 6, k=\frac{n}{2}-3$ when $a \equiv 4 \pmod{12},$ and $k=\frac{n}{2}-6$ when $a \equiv 10 \pmod{12}.$ We may manually check $a=1,4,7,10$ and we find that $a=1,4,10$ have no solutions and for $a=7$ we can have $k=2.$ Thus, we have $a=1,2 \pmod{3}$ and $a \ne 1,4,10.$ Finding our corresponding $n$ for these values, we get $n \equiv 1,5 \pmod{6}$ and $n \ne 5,17.$
05.05.2024 08:18
A classic reformulation is to tile the plane with equilateral triangles and shine a ray of light from one vertex until it hits another vertex in this infinite plane, and $n$ is the number of sides hit before reaching this vertex. Color the vertices $A$, $B$, $C$, where each color $A$ vertex is surrounded by three color $B$ and three color $C$ vertices, and symmetrically for $B$, $C$. Consider the shortest path taken from one color $A$ vertex to another as $x$ steps in one direction and $y$ steps in another, where $\gcd(a,b)=1$. The line segment between these two can be determined to hit $n=2(x+y)-3$ sides. We claim our possibilities for $n$ are $n$ congruent to $\boxed{1,5 \pmod 6 \text{ except } 5, 17}$. Notice 3 can't divided either $a$ or $b$; otherwise, we must have $3 \mid \gcd(a,b) > 1$, contradiction. We provide the following construction for our claim, which excludes the exceptions 5 and 17: \begin{align*} (a,b) = (1,1+3k) &\implies a+b \equiv 2 \pmod 3 \implies n \equiv 1 \pmod 6 \\ (a,b) = (2,5+6k) &\implies a+b \equiv 1 \pmod 6 \implies n \equiv 11 \pmod{12} \\ (a,b) = (5+6x,11+6x) &\implies a+b \equiv 4 \pmod{12} \implies n \equiv 5 \pmod{24} \\ (a,b) = (5+6x,17+6x) &\implies a+b \equiv 10 \pmod{12} \implies n \equiv 17 \pmod{24}. \quad \blacksquare \end{align*}
08.07.2024 23:06
I came up with the perhaps worst coordinate system for this problem. Anyways, note that this problem is actually just counting the number of intersections of a segment with a grid composed of equilateral triangles, with the endpoints of the segment being points on the grid. Firstly, choose a starting point. This is $(0,0).$ Then, choose two of the lines going through $(0,0)$ that are rotated exactly $30$ degrees. Then it works like you expect, where you find where the gridlines going through that point intersect the axes. WLOG, let $x,y>0$ as all sexdrants are just rotations of eachother by symmetry. Note that the amount of intersections a segment from the origin to $(x,y)$ is $$x-1+y-1+(x+y)-1=2(x+y)-3.$$Note that when $x+y$ doesn't change, the number of intersections doesn't either. Now, to deal with the reflection condition. Reflecting $0,0$ in all directions, we get that the possible changes to a point that we know we can get to is $(+1,+1),(-1,+2),(+2,-1)$ and negations. Thus, we have a $(+3,0)$ and a $(0,+3),$ so we can also have $(+3, -3).$ Note that this keeps $x+y$ constant, and that $x \equiv y \pmod 3.$ However, for the pebble to not pass through any other vertice first, we must have $\gcd{x,y}=1.$ Thus, any values where $x+y \equiv 0 \pmod 3$ do not work. We take $\pmod 6$ because $2 \cdot 3=6.$ Thus, the only possible values are $2 \cdot 1 - 3 \equiv 5 \pmod 6, 2 \cdot 2 - 3 \equiv 1 \pmod 6.$ However some values of $x+y$ only have $\gcd{x,y} \neq 1.$ These are $x+y=4, 10.$ These can be checked by hand. For all other values of $x+y,$ here are the constructions. For $x+y = 3k-1$, use $(3k-2, 1).$ For $x+y = 6k+1$ use $(6k-1, 2).$ For $x+y = 12k+4$, use $(6k+5, 6k-1).$ For $x+y = 12k+10$, use $(6k+11, 6k-1).\blacksquare$