OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).
FORMULA
From Wesley Ivan Hurt, Jul 24 2016: (Start)
G.f.: x*(3 + 6*x + x^2 + 6*x^3 + 3*x^4)/(x^3 - 1)^2.
a(n) = 2*a(n-3) - a(n-6) for n>5.
a(n) = 27*n/(5 + 4*cos(2*n*Pi/3))^2.
If n mod 3 = 0, then n/3, else 3*n.
a(n) = lcm(numerator(n/3), denominator(n/3)). (End)
Sum_{k=1..n} a(k) ~ (19/18)*n^2. - Amiram Eldar, Oct 07 2023
EXAMPLE
a(7) = 21 because lcm(3,7) = 21, gcd(3,7) = 1 and 21/1 = 21.
MAPLE
MATHEMATICA
LCM[3, #]/GCD[3, #]&/@Range[0, 70] (* Harvey P. Dale, May 16 2013 *)
PROG
(Magma) [Lcm(n, 3)/Gcd(n, 3) : n in [0..100]]; // Wesley Ivan Hurt, Jul 24 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
W. Neville Holmes, Jul 04 2007
EXTENSIONS
Corrected and extended by Harvey P. Dale, May 16 2013
STATUS
approved