OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Kevin S. Brown, Random Walk Through Pi.
FORMULA
a(1) = d(1) = 3; a(n) = a(n-1) + (-1)^(n+1) d(n) for n > 1.
EXAMPLE
a(3) = d(1) - d(2) + d(3) = 3 - 1 + 4 = 6.
MATHEMATICA
n = 100; Accumulate[(-1)^Range[0, n - 1] * RealDigits[Pi, 10, n][[1]]] (* Amiram Eldar, Oct 13 2020 *)
CROSSREFS
KEYWORD
base,easy,sign
AUTHOR
Joseph L. Pe, Apr 09 2002
EXTENSIONS
More terms from Amiram Eldar, Oct 13 2020
STATUS
approved