Anonymous ID: 780a8d July 16, 2018, 9:40 a.m. No.6971   🗄️.is 🔗kun

>>6969

Correcting my correction

 

My x to t, t to x calculation was wrong, and because of that a[p - t - 1] worked fine for me, not a[p + 1 - t].

 

So to add more usefulness and to keep things in one place:

 

Odd e: x = 2t - 1

Even e: x = 2(t-1)

Anonymous ID: 780a8d Sept. 16, 2018, 1:04 a.m. No.7591   🗄️.is 🔗kun

Since we're dealing with series here, I'm adding a few things regarding them.

 

To sum all the a's in a column, row 1:

 

odd e: n(e/2 + 1) + 2((n-1)n(n+1)/3)

even e: ne/2 + 2(n(n+1)(2n+1)/6)

 

The sum of d's in a column, row 1:

 

even e: n(e/2 + 1) + 2(n(n+1)(2n+1)/6)

odd e: ne/2 + 2((n-1)n(n+1)/3)

 

To get a partial sum, that is a sum between nth and nth + k (for some nth and k)

 

s1 = sum(e, k)

s2 = sum(e, nth - 1)

return s1 - s2