OFFSET
1,1
COMMENTS
Define L(n) to be the n-th partial sum of the Leibniz formula Pi = 4 - 4/3 + 4/5 - 4/7 + ..., i.e., L(n) = Sum_{j=1..n} 4*(-1)^(j+1)/(2*j-1). For every positive integer n, L(n+1) is closer to Pi than L(n) is. If we let V be the average of the two consecutive partial sums L(n) and L(n+1), then the partial sums that lie closest to V are L(a(n)-1) and L(a(n)+1) (one of which is above V, the other below).
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(1) = 6; a(n) = a(n-1) + r(n), where r(n) = A047550(n) = 4*n - (-1)^n.
G.f.: x*(6 + x + x^3)/((1 + x)*(1 - x)^3). - Jinyuan Wang, Apr 03 2021
From Stefano Spezia, Apr 03 2021: (Start)
a(n) = (3 + (-1)^(n+1) + 4*n + 4*n^2)/2.
a(2*n) = A102083(n).
a(2*n-1) = A254527(n). (End)
EXAMPLE
The first several partial sums are as follows:
n L(n)
- ------------
1 4.0000000000
2 2.6666666...
3 3.4666666...
4 2.8952380...
5 3.3396825...
6 2.9760461...
7 3.2837384...
8 3.0170718...
.
For n=1, the average of the partial sums L(1) and L(2) is V = (L(1) + L(2))/2 = (4 + 2.6666666...)/2 = 3.3333333...; the two partial sums closest to V are L(5)=3.3396825... and L(7)=3.2837384..., and V lies in the interval between them, so a(1)=6.
The formula as it is written works for all data in the sequence, but it needs to be proven that it works for all possible integer values of n.
MATHEMATICA
Rest@ CoefficientList[Series[x (6 + x + x^3)/((1 + x) (1 - x)^3), {x, 0, 48}], x] (* Michael De Vlieger, Apr 05 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Raphael Ranna, Apr 02 2021
STATUS
approved