A093148 a(n) = gcd(Fibonacci(n+5), Fibonacci(n+1)).
1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,1).
Programs
-
Magma
[1+2*0^((n+1) mod 4) : n in [0..100]]; // Wesley Ivan Hurt, Oct 23 2014
-
Maple
A093148:=n->1+2*0^(n+1 mod 4): seq(A093148(n), n=0..100); # Wesley Ivan Hurt, Oct 23 2014
-
Mathematica
f[n_] := Switch[Mod[n, 4], 0, 1, 1, 1, 2, 1, 3, 3]; Array[f, 105, 0] (* Robert G. Wilson v, Jan 23 2012 *) PadRight[{},120,{1,1,1,3}] (* Harvey P. Dale, Sep 03 2021 *)
-
PARI
a(n)=if(n%4==3,3,1) \\ Charles R Greathouse IV, Oct 07 2015
Formula
G.f.: (1+x+x^2+3*x^3)/(1-x^4); a(n) = 3/2-sin(Pi*n/2)-cos(Pi*n)/2.
From Klaus Brockhaus, May 30 2010: (Start)
a(n) = a(n-4) for n > 3; a(0) = a(1) = a(2) = 1, a(3) = 3.
a(n) = (3-(-1)^n+(1-(-1)^n)*i*i^n)/2 where i = sqrt(-1). (End)
a(n) = 1 + 2*0^mod(n+1, 4). - Wesley Ivan Hurt, Oct 23 2014
Comments