login
A069159
a(n) = d(1) - d(2) + d(3) - d(4) + ... + (-1)^(n+1) d(n), where d(k) denotes the k-th term of the digit sequence 3, 1, 4, 1, 5, 9,.... of Pi.
3
3, 2, 6, 5, 10, 1, 3, -3, 2, -1, 4, -4, 5, -2, 7, 4, 6, 3, 11, 7, 13, 11, 17, 13, 16, 13, 21, 18, 20, 13, 22, 17, 17, 15, 23, 15, 19, 18, 27, 20, 21, 15, 24, 21, 30, 21, 24, 17, 22, 21, 21, 16, 24, 22, 22, 13, 20, 16, 25, 21, 25, 20, 29, 27, 30, 30, 37, 29, 30
OFFSET
1,1
LINKS
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
Cf. A000796 (Pi).
Sequence in context: A067587 A198259 A120476 * A306389 A255548 A278504
KEYWORD
base,easy,sign
AUTHOR
Joseph L. Pe, Apr 09 2002
EXTENSIONS
More terms from Amiram Eldar, Oct 13 2020
STATUS
approved