A229144 Partial sums of (Fibonacci numbers mod 3).
0, 1, 2, 4, 4, 6, 8, 9, 9, 10, 11, 13, 13, 15, 17, 18, 18, 19, 20, 22, 22, 24, 26, 27, 27, 28, 29, 31, 31, 33, 35, 36, 36, 37, 38, 40, 40, 42, 44, 45, 45, 46, 47, 49, 49, 51, 53, 54, 54, 55, 56, 58, 58, 60, 62, 63, 63, 64, 65, 67, 67, 69, 71, 72, 72, 73, 74, 76, 76, 78, 80, 81, 81, 82, 83, 85, 85, 87, 89
Offset: 0
Keywords
Examples
The first F(n) are 0, 1, 1, 2, 3, 5, 8,... mod 3 this becomes 0, 1, 1, 2, 0, 2, 2,... so a(n) starts 0, 1, 2, 4 ,4, 6, 8, ...
Links
- Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 1, -1).
Programs
-
JavaScript
N=50; f=new Array(); f[0]=0; f[1]=1; for (i=2;i
-
Mathematica
Accumulate[Mod[Fibonacci[Range[0,80]],3]] (* or *) LinearRecurrence[{1,0,0,0,0,0,0,1,-1},{0,1,2,4,4,6,8,9,9},80] (* Harvey P. Dale, Aug 18 2024 *)
-
PARI
concat([0], Vec( (x+x^2+2*x^3+2*x^5+2*x^6+x^7)/((1-x^8)*(1-x)) + O(x^166) ) ) \\ Joerg Arndt, Sep 15 2013
Formula
G.f.: (x+x^2+2*x^3+2*x^5+2*x^6+x^7)/((1-x^8)*(1-x)). [Joerg Arndt, Sep 15 2013]