OFFSET
1,3
COMMENTS
The product of any two terms belongs to the sequence and therefore also a(n)^2, a(n)^3, a(n)^4, etc. - Bruno Berselli, Nov 28 2012
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-2,2,-1).
FORMULA
a(n+1) = 6*floor(n/3)+(n mod 3). - Gary Detlefs, Mar 09 2010
G.f.: x^2*(1+x^2+2*x^4) / ( (1+x+x^2)*(x^2-x+1)*(x-1)^2 ). - R. J. Mathar, Dec 05 2011
From Wesley Ivan Hurt, Jun 15 2016: (Start)
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-2*a(n-4)+2*a(n-5)-a(n-6) for n>6.
a(n) = (12*n-18+sqrt(3)*(3*sin(n*Pi/3)+sin(2*n*Pi/3)))/9.
a(6k) = 8k-2, a(6k-1) = 8k-4, a(6k-2) = 8k-5, a(6k-3) = 8k-6, a(6k-4) = 8k-7, a(6k-5) = 8k-8. (End)
Sum_{n>=2} (-1)^n/a(n) = (sqrt(2)-1)*Pi/8 + 3*log(2)/4. - Amiram Eldar, Dec 26 2021
MAPLE
A047420:=n->(12*n-18+sqrt(3)*(3*sin(n*Pi/3)+sin(2*n*Pi/3)))/9: seq(A047420(n), n=1..100); # Wesley Ivan Hurt, Jun 15 2016
MATHEMATICA
Select[Range[0, 100], MemberQ[{0, 1, 2, 3, 4, 6}, Mod[#, 8]] &] (* Wesley Ivan Hurt, Jun 15 2016 *)
LinearRecurrence[{2, -2, 2, -2, 2, -1}, {0, 1, 2, 3, 4, 6}, 70] (* Harvey P. Dale, Aug 11 2021 *)
PROG
(Magma) [n : n in [0..100] | n mod 8 in [0..4] cat [6]]; // Wesley Ivan Hurt, Jun 15 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved