Find formula of the sequence
>>8014500
https://oeis.org/search?q=2%2C2%2C2%2C4%2C6%2C6%2C6%2C8&language=english&go=Search
>>8014697
I tried that, it's not good.
e = mc^2
>>8014708
well, ure sample sucks
>>8014714
cmon
>>8014500
1 + n + cos(nπ/2)
>>8014813
no.
1+3+cos(3pi/2) = 3 =/= 2
close though
>>8014827
0 2
1 2
2 2
3 4
4 6
5 6
6 6
7 8
8 10
9 10
10 10
>>8014500
n,n,n.n+2,n+2,n,n+2,n+2,n,n...
>>8014697
This is the best answer.
It also demonstrates the artificiality of human pattern-recognition. We might think the next term be 8, but if the sequence arose in the context of mathematics, it would almost certainly be 12.
[eqn]
(x)(x-1)(x-2)(x-3)(x-4)(x-5)(x-6)(x-7)\left\(\frac{2}{x}+\frac{2}{x-1}+\frac{2}{x-2}+\frac{4}{x-3}+\frac{6}{x-4}+\frac{6}{x-5}+\frac{6}{x-6}+\frac{8}{x-7}\right)
[/eqn]
You're welcome.
Fun fact, there are infinitely many
>>8014827
cos(3pi/2) = 0 dummy
>>8014500
Assume sequences begin at index 1.
The trick is to figure out how to write a formula for the sequence:
0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, ...
This sequence is given by the formula [math]g(n) = 1 - ( ( 1 - \frac{1}{4} n ) + \left \lfloor{\frac{n}{4}}\right \rfloor) \cdot (n - \left \lfloor{\frac{n}{4}}\right \rfloor) [/math].
Therefore OP's sequence is given by the formula:
[math]f(n) = 2 + 4 \cdot \left \lfloor{\frac{n-1}{4}}\right \rfloor + 2 \cdot ( 1 - ( ( 1 - \frac{1}{4} n ) + \left \lfloor{\frac{n}{4}}\right \rfloor) \cdot (n - \left \lfloor{\frac{n}{4}}\right \rfloor)) [/math].
>>8015031
Missing a couple parentheses on the right. Just pretend they're there.
>>8015035
>Missing some mass in the galaxies, just pretend it's there
spoken like a true astrophysicist.
>>8015031
subtract n from the sequence:
1 0 -1 0 1 0 -1 0 ...
n+sin(nπ/2)
>>8014500
The series begins indexed on N.
let Z= (n modulo 4) +1.
Let R=(Z-2)(Z-3)(Z-4)/(-6) which yields 0,0,0,1,0,0,0,1....
Let T=ceiling(n/4).
Which yields 1,1,1,1,2,2,2,2,3,3,3,3....
Then the desired series is given by
4T -2 + 2R.
>>8015059
Damn that's far more elegant than my solution.