OFFSET
1,1
COMMENTS
The recurrence for the general case lcm(n+k, n-k) is a(n) = 3*a(n-2*k) - 3*a(n-4*k) + a(n-6*k) for n > 6*k.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,3,0,0,0,-3,0,0,0,1).
FORMULA
a(n) = lcm(n - 2, n + 2).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12) for n > 12.
G.f.: x*(-6*x^12 - 2*x^11 - 3*x^10 + 23*x^8 + 12*x^7 + 30*x^6 + 8*x^5 + 12*x^4 + 6*x^3 + 5*x^2 + 3) / (-x^12 + 3*x^8 - 3*x^4 + 1).
From Peter Bala, Feb 15 2019: (Start)
For n >= 2, a(n) = (n^2 - 4)/b(n), where b(n), n >= 1, is the periodic sequence [1, 4, 1, 2, 1, 4, 1, 2, ...] of period 4. a(n) is thus a quasi-polynomial in n.
For n >= 3, a(n) = (n + 2)*A060819(n-2). (End)
Sum_{n>=3} 1/a(n) = 5/6. - Amiram Eldar, Aug 09 2022
Sum_{k=1..n} a(k) ~ 11*n^3/48. - Vaclav Kotesovec, Aug 09 2022
EXAMPLE
a(8) = 30 because lcm(8 + 2, 8 - 2) = lcm(6, 10) = 30.
MAPLE
MATHEMATICA
Table[LCM[n - 2, n + 2], {n, 50}] (* Alonso del Arte, Nov 07 2014 *)
CoefficientList[Series[(-6 x^12 - 2 x^11 - 3 x^10 + 23 x^8 + 12 x^7 + 30 x^6 + 8 x^5 + 12 x^4 + 6 x^3 + 5 x^2 + 3) / (-x^12 + 3 x^8 - 3 x^4 + 1), {x, 0, 40}], x] (* Vincenzo Librandi, Nov 10 2014 *)
LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {3, 0, 5, 6, 21, 8, 45, 30, 77, 24, 117, 70, 165}, 60] (* Harvey P. Dale, Jul 11 2017 *)
PROG
(PARI) a(n) = lcm(n+2, n-2)
(PARI) Vec(x*(-6*x^12 -2*x^11 -3*x^10 +23*x^8 +12*x^7 +30*x^6 +8*x^5 +12*x^4 +6*x^3 +5*x^2 +3) / (-x^12 +3*x^8 -3*x^4 +1) + O(x^100))
(Magma) [Lcm(n-2, n+2): n in [1..60]]; // Vincenzo Librandi, Nov 10 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Nov 07 2014
STATUS
approved