Problem:
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:
Let aiβ=seciA+taniA.
Notice that we can factor this. Let's attempt to pull out a factor of secA+tanA.
If we pull out aiβ from anβ, notice that we get
We need to find the terms aiβ by finding cosA using the information we are given about tanA.
cosAsinAβsinAsinAβ=2cosA=2cos2A=2β2sin2Aβ
Solving this equation and then solving for cosA we get that
cosA=4217ββ2ββ.
This yields a0β=2, a1β=17β+4β, a2β=17β, aiβ=17β+4β(17ββ2) and then a4β=9.
For this to be an integer, notice that for an integer aiβ that 4β£i.
Now, we have the recursion
anβ=9anβ4ββ16anβ8β.
We now have to notice that these are all multiples of 4, so we make the substitution anβ=b4nβ and plugging this in directly you get
bwβ=9β 4β bwβ4ββ16β 4β bwβ8β.
Notice that we have b0β=2, b4β=9. This yields
biβ=9biβ4ββ16aiβ8β.
We notice that after iβ₯2, that bnββ‘β1(mod2) and we have to find when it's β1(mod5) in order for the units digit to be 9.
Notice that (mod5), we have
Trying out and seeing the cycle, we see that every 3, we get that 2 are β1(mod5) and then the first is 2(mod5).
In particular, the residues go 2,β1,β1,2,β1,β1,β¦.
As long as w is not a multiple of 3, we are good, and notice that n=4w so the only condition for n is multiples of 4 that aren't multiples of 3, and there are 167β values.