OFFSET
1,2
COMMENTS
a(k)^m is a term for k and m in N. - Jerzy R Borysowicz, Apr 18 2023
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
From Johannes W. Meijer, Jul 07 2011: (Start)
a(n) = floor((n+2)/4) + floor((n+1)/4) + floor(n/4) + 2*floor((n-1)/4) + floor((n+3)/4).
G.f.: x*(1 + x + x^2 + x^3 + 2*x^4)/(x^5 - x^4 - x + 1). (End)
From Wesley Ivan Hurt, May 20 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (6n - 5 - i^(2n) + (1+i)*i^(1-n) + (1-i)*i^(n-1))/4 where i=sqrt(-1).
E.g.f.: (4 + sin(x) - cos(x) + (3*x - 2)*sinh(x) + 3*(x - 1)*cosh(x))/2. - Ilya Gutkovskiy, May 21 2016
From Wesley Ivan Hurt, May 21 2016: (Start)
a(n) = A047246(n) + 1.
a(n+2) - a(n+1) = A093148(n) for n>0.
a(1-n) = - A047247(n). (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(3)*Pi/12 + 2*log(2)/3 - log(3)/4. - Amiram Eldar, Dec 17 2021
MAPLE
A047227:=n->(6*n-5-I^(2*n)+(1+I)*I^(1-n)+(1-I)*I^(n-1))/4: seq(A047227(n), n=1..100); # Wesley Ivan Hurt, May 20 2016
MATHEMATICA
Complement[Range[100], Flatten[Table[{6n - 1, 6n}, {n, 0, 15}]]] (* Alonso del Arte, Jul 07 2011 *)
Select[Range[100], MemberQ[{1, 2, 3, 4}, Mod[#, 6]]&] (* Vincenzo Librandi, Jan 06 2013 *)
PROG
(Magma) [n: n in [0..100] | n mod 6 in [1..4]]; // Vincenzo Librandi, Jan 06 2013
(PARI) a(n)=([0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1; -1, 1, 0, 0, 1]^(n-1)*[1; 2; 3; 4; 7])[1, 1] \\ Charles R Greathouse IV, May 03 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved