OFFSET
1,1
COMMENTS
Also, numbers n such that Fibonacci(n) = 2 (mod 3), where Fibonacci = A000045. - M. F. Hasler, Sep 29 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
G.f.: x*(1+x)*(2*x^2-x+3)/((1+x+x^2)*(x-1)^2). - R. J. Mathar, Dec 07 2011
From Wesley Ivan Hurt, Jun 13 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = 2*(12*n-3-6*cos(2*n*Pi/3)+sqrt(3)*sin(2*Pi*n/3))/9.
a(3k) = 8k-2, a(3k-1) = 8k-3, a(3k-2) = 8k-5. (End)
MAPLE
A047443:=n->2*(12*n-3-6*cos(2*n*Pi/3)+sqrt(3)*sin(2*Pi*n/3))/9: seq(A047443(n), n=1..100); # Wesley Ivan Hurt, Jun 13 2016
MATHEMATICA
Select[Range[150], MemberQ[{3, 5, 6}, Mod[#, 8]]&] (* Harvey P. Dale, Oct 04 2011 *)
LinearRecurrence[{1, 0, 1, -1}, {3, 5, 6, 11}, 100] (* Vincenzo Librandi, Jun 14 2016 *)
PROG
(PARI) is_A047443(n)=bittest(104, n%8) \\ with 104=2^3+2^5+2^6. - M. F. Hasler, Sep 29 2012
(PARI) A047443(n)={n=divrem(n, 3); n[1]*8+[-2, 3, 5][n[2]+1]} \\ M. F. Hasler, Sep 29 2012
(Magma) [n : n in [0..150] | n mod 8 in [3, 5, 6]]; // Wesley Ivan Hurt, Jun 13 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved