Having trouble with a procedure simply calculating the first value of n in a sequence for when the total is greater or equal to a value of my choice.
The formula for the sequence is as follows
Sn=(n)(1-(-1)^n)/2
So...
S0=0
S1=1
S2=0
S3=3
S4=0
S5=5... and so on.
Therefore...
Tn0=0
Tn1=0
Tn2=1
Tn3=1
Tn4=4
Tn5=4
Tn6=9
Tn7=9... and so on
Which is (floor(n/2))^2
I feel like the procedure attached seems correct but will not give me the correct answer.
2019 should give the answer 90
Please help
The formula for the sequence is as follows
Sn=(n)(1-(-1)^n)/2
So...
S0=0
S1=1
S2=0
S3=3
S4=0
S5=5... and so on.
Therefore...
Tn0=0
Tn1=0
Tn2=1
Tn3=1
Tn4=4
Tn5=4
Tn6=9
Tn7=9... and so on
Which is (floor(n/2))^2
I feel like the procedure attached seems correct but will not give me the correct answer.
2019 should give the answer 90
Please help