login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079343 Period 6: repeat [0, 1, 1, 2, 3, 1]; also F(n) mod 4, where F(n) = A000045(n). 14
0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
This sequence shows that every sixth Fibonacci number (A134492) is divisible by 4. - Alonso del Arte, Jul 27 2013
LINKS
FORMULA
a(n) = 2^(1 - P(3, n) + P(6, n+2))*3^P(6, n+3) - 1, where P(k, n) = floor(1/2*cos(2*n*Pi/k) + 1/2). [Gary Detlefs, May 16 2011]
a(n) = 4/3 - cos(Pi*n/3) - sin(Pi*n/3)/sqrt(3) - cos(2*Pi*n/3)/3 + sin(2*Pi*n/3)/sqrt(3). - R. J. Mathar, Oct 08 2011
G.f.: x*(1+2*x^2+x^3) / ( (1-x)*(1-x+x^2)*(1+x+x^2) ). - R. J. Mathar, Jul 14 2012
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4. - Wesley Ivan Hurt, Jun 20 2016
E.g.f.: 2*(2*exp(x) - sqrt(3)*sin(sqrt(3)*x/2)*sinh(x/2) - cos(sqrt(3)*x/2)*(sinh(x/2) + 2*cosh(x/2)))/3. - Ilya Gutkovskiy, Jun 20 2016
EXAMPLE
a(5) = F(5) mod 4 = 5 mod 4 = 1.
a(6) = F(6) mod 4 = 8 mod 4 = 0.
a(7) = F(7) mod 4 = 13 mod 4 = 1.
MAPLE
A079343:=n->[0, 1, 1, 2, 3, 1][(n mod 6)+1]: seq(A079343(n), n=0..100); # Wesley Ivan Hurt, Jun 20 2016
MATHEMATICA
PadLeft[{}, 108, {0, 1, 1, 2, 3, 1}] (* Harvey P. Dale, Aug 10 2011 *)
Table[Mod[Fibonacci[n], 4], {n, 0, 127}] (* Alonso del Arte, Jul 27 2013 *)
LinearRecurrence[{1, -1, 1, -1, 1}, {0, 1, 1, 2, 3}, 105] (* Ray Chandler, Aug 27 2015 *)
PROG
(PARI) for (n=0, 100, print1(fibonacci(n)%4", "))
(Magma) [Fibonacci(n) mod 4: n in [0..100]]; // Vincenzo Librandi, Feb 04 2014
CROSSREFS
Sequence in context: A321932 A321933 A030373 * A004566 A321896 A321897
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Jan 04 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 11:52 EDT 2024. Contains 371779 sequences. (Running on oeis4.)