login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A362358
Alternating sum of digits of the Fibonacci numbers, with a plus sign for the last digit.
1
0, 1, 1, 2, 3, 5, 8, 2, -1, 1, 0, 1, 1, 2, 3, 5, 8, 2, -1, -10, 0, 12, 1, 2, 3, 5, -3, 13, -1, 1, -11, 1, 12, 2, 3, 5, -3, 13, 10, 1, 0, 1, -10, 13, 3, -17, 19, -9, 10, 1, 0, 1, 12, 13, 3, -6, 8, 2, -1, -10, 0, 1, 12, -9, 3, 5, -3, -9, -23, 1, -22, 34, -10, 2
OFFSET
0,4
COMMENTS
a(n) mod 11 = F(n) mod 11 = A105955(n). This is the mod 11 rule applied to F(n) = A000045.
LINKS
FORMULA
Let [f_s(n), f_{s(n)-1}, ..., f_0] be the list of digits of F(n) = A000040(n) with s(n) = A060384(n) - 1, then a(n) = Sum_{j=0..s(n)} (-1)^j*f_j.
a(n) = A055017(A000045(n)), for n >= 0.
EXAMPLE
F(17) = 1597, s(n) = 4 - 1 = 3, a(17) = 7 - 9 + 5 - 1 = 2.
MATHEMATICA
a[n_]:=Sum[(-1)^(IntegerLength[Fibonacci[n]]-i) Part[IntegerDigits[Fibonacci[n]], i], {i, IntegerLength[Fibonacci[n]]}]; Array[a, 66, 0] (* Stefano Spezia, May 27 2023 *)
PROG
(PARI) a(n) = my(d=Vecrev(digits(fibonacci(n)))); sum(k=1, #d, (-1)^(k+1)*d[k]); \\ Michel Marcus, May 28 2023
CROSSREFS
KEYWORD
sign,base,look,easy
AUTHOR
Wolfdieter Lang, May 26 2023
STATUS
approved