cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A362358 Alternating sum of digits of the Fibonacci numbers, with a plus sign for the last digit.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, May 26 2023

Keywords

Comments

a(n) mod 11 = F(n) mod 11 = A105955(n). This is the mod 11 rule applied to F(n) = A000045.

Examples

			F(17) = 1597, s(n) = 4 - 1 = 3, a(17) = 7 - 9 + 5 - 1 = 2.
		

Crossrefs

Programs

  • 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 *)
  • PARI
    a(n) = my(d=Vecrev(digits(fibonacci(n)))); sum(k=1, #d, (-1)^(k+1)*d[k]); \\ Michel Marcus, May 28 2023

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.