There is a sequence. The first integer is positive, the second integer is negative. An alternating part is a part that switches between positive and negative (0 is not included)
(a) I have a complete answer to this part
(b) What second term should be chosen to get the longest possible switching between positive and negative
For b, I wrote an entire proof as to why, assuming a is the positive first integer, b is the integer closest to -0.618a. However, I was testing cases today, and I found that a=43 is an exception to this. 0.618 multiplied by a would be -26.57 something, which is about -27. However, the number to make the sequence the longest is actually -26.
Could anyone give me a hint as to why this happened?