Let A be an acute angle such that tanA=2cosA. Find the number of positive integers n less than or equal to 1000 such that secnA+tannA is a positive integer whose units digit is 9.
解析
Solution 1
Denote an=secnA+tannA. For any k, we have
an=secnA+tannA=(secn−kA+tann−kA)(seckA+tankA)−secn−kAtankA−tann−kAseckA=an−kak−2ksecn−kAcoskA−2ktann−kAcotkA=an−kak−2kan−2k.
Next, we compute the first several terms of an.
By solving equation tanA=2cosA, we get cosA=4217−2. Thus, a0=2, a1=17+4, a2=17, a3=17+4(17−2), a4=9.
In the rest of analysis, we set k=4. Thus,
an=an−4a4−24an−8=9an−4−16an−8.
Thus, to get an an integer, we have 4∣n. In the rest of analysis, we only consider such n. Denote n=4m and bm=a4n. Thus,
bm=9bm−1−16bm−2
with initial conditions b0=2, b1=9.
To get the units digit of bm to be 9, we have
bm≡−1bm≡−1(mod2)(mod5)
Modulo 2, for m≥2, we have
bm≡9bm−1−16bm−2≡bm−1.
Because b1≡−1(mod2), we always have bm≡−1(mod2) for all m≥2.
Modulo 5, for m≥5, we have
bm≡9bm−1−16bm−2≡−bm−1−bm−2.
We have b0≡2(mod5), b1≡−1(mod5), b2≡−1(mod5), b3≡2(mod5), b4≡−1(mod5), b5≡−1(mod5), b6≡2(mod5). Therefore, the congruent values modulo 5 is cyclic with period 3. To get bm≡−1(mod5), we have 3∤m(mod3).
From the above analysis with modulus 2 and modulus 5, we require 3∤m(mod3).
For n≤1000, because n=4m, we only need to count feasible m with m≤250. The number of feasible m is
tanA=2cosA⟹sinA=2cos2A⟹sin2A+cos2A=4cos4A+cos2A=1⟹cos2A=817−1.cn=secnA+tannA=cosnA1+2ncosnA=(4cos2A+1)2n+(4cos2A)2n==(217+1)2n+(217−1)2n.
It is clear, that cn is not integer if n=4k,k>0.
Denote x=217+1,y=217−1⟹
x⋅y=4,x+y=17,x−y=1⟹x2+y2=(x−y)2+2xy=9=c4.c8=x4+y4=(x2+y2)2−2x2y2=92−2⋅16=49.c4k+4=x2k+2+y2k+2=(x2k+y2k)(x2+y2)−(x2y2)(x2k−2+y2k−2)=9c4k−16c4k–4⟹c12=9c8−16c4=9⋅49−16⋅9=9⋅33=297.c16=9c12−16c8=9⋅297−16⋅49=1889.c12m+4(mod10)=9⋅c12m(mod10)−16(mod10)⋅c12m−4(mod10)==(9⋅7−6⋅9)(mod10)=(3−4)(mod10)=9.c12m+8(mod10)=9⋅c12m+4(mod10)−16(mod10)⋅c12m(mod10)==(9⋅9−6⋅7)(mod10)=(1−2)(mod10)=9.c12m+12(mod10)=9⋅c12m+8(mod10)−16(mod10)⋅c12m+4(mod10)==(9⋅9−6⋅9)(mod10)=(1−4)(mod10)=7⟹
The condition is satisfied iff n=12k+4 or n=12k+8.
If n≤N then the number of possible n is ⌊4N⌋−⌊12N⌋.
For N=1000 we get ⌊41000⌋−⌊121000⌋=250−83=167.
vladimir.shelomovskii@gmail.com, vvsss
Note
A key idea in this solution is realizing that to calculate values of an+bn is difficult directly, so we try to think about it recursively.
We then see how we can go from an+bn to an+1+bn+1, and learn that (an+bn)(a+b)−anb−abn=an+1bn+1.
So, letting ai+bi=si, si=(a+b)si−1−(ab)si−2 where we set n+1 as i, and (an+bn)=si−1, as well as (anb+abn)=(ab)(an−1+bn−1)=(ab)si−2.