|
|
A338157
|
|
Numbers that follow from the alternating series 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 of the Golden Ratio.
|
|
0
|
|
|
1, -5, -4, -12, -12, -15, -12, -21, -13, -21, -14, -18, -9, -17, -8, -12, -4, -8, 0, -2, -2, -6, -1, -9, -3, -11, -8, -12, -9, -15, -10, -16, -13, -21, -20, -21, -14, -21, -19, -19, -16, -16, -7, -8, -1, -10, -2, -2, 3, -4, 2, 0, 8, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(1) = d(1) = 2; a(n) = a(n-1) + (-1)^(n+1) d(n) for n > 1.
|
|
EXAMPLE
|
a(3) = d(1) - d(2) + d(3) = 1 - 6 + 1 = -4.
|
|
MATHEMATICA
|
S[X_, n_] :=
Accumulate[(-1)^Range[0, n - 1]*RealDigits[X, 10, n][[1]]]
S[GoldenRatio, 54] (*This generates the first 54 elements of this sequence*)
|
|
CROSSREFS
|
Cf. A001622 (Golden Ratio), A069159 (similar sequence for Pi), A338108 (similar sequence for Euler's number).
|
|
KEYWORD
|
base,easy,sign,less
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|