OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
FORMULA
a(n) = 2*(3*floor((n-1)/6)+((n-1) mod 3)+1)-(floor((n+2)/3) mod 2). - Joshua Zucker, Aug 29 2012
G.f.: x*(1 + 2*x + 2*x^2 - 3*x^3 + 2*x^4 + 2*x^5)/(1 - x - x^6 + x^7). - Robert Israel, May 10 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/3 + log(3)/2 - Pi/(6*sqrt(3)). - Amiram Eldar, Feb 09 2023
MAPLE
f:= gfun:-rectoproc({a(n) = a(n-1)+a(n-6)-a(n-7), a(1)=1, a(2)=3, a(3)=5, a(4)=2, a(5)=4, a(6)=6, a(7)=7}, a(n), remember):
map(f, [$1..100]); # Robert Israel, May 10 2020
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {1, 3, 5, 2, 4, 6, 7}, 100] (* Amiram Eldar, Feb 09 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Curtz, Oct 23 2007
STATUS
approved