Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #38 Aug 10 2022 03:28:27
%S 3,0,5,6,21,8,45,30,77,24,117,70,165,48,221,126,285,80,357,198,437,
%T 120,525,286,621,168,725,390,837,224,957,510,1085,288,1221,646,1365,
%U 360,1517,798,1677,440,1845,966,2021,528,2205,1150,2397,624,2597,1350,2805
%N Least common multiple of n + 2 and n - 2.
%C 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.
%H Colin Barker, <a href="/A249859/b249859.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,3,0,0,0,-3,0,0,0,1).
%F a(n) = lcm(n - 2, n + 2).
%F a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12) for n > 12.
%F 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).
%F From _Peter Bala_, Feb 15 2019: (Start)
%F 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.
%F For n >= 3, a(n) = (n + 2)*A060819(n-2). (End)
%F Sum_{n>=3} 1/a(n) = 5/6. - _Amiram Eldar_, Aug 09 2022
%F Sum_{k=1..n} a(k) ~ 11*n^3/48. - _Vaclav Kotesovec_, Aug 09 2022
%e a(8) = 30 because lcm(8 + 2, 8 - 2) = lcm(6, 10) = 30.
%p A249859:=n-> ilcm(n+2,n-2): seq(A249859(n), n=1..100); # _Wesley Ivan Hurt_, Jul 09 2017
%t Table[LCM[n - 2, n + 2], {n, 50}] (* _Alonso del Arte_, Nov 07 2014 *)
%t 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 *)
%t 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 *)
%o (PARI) a(n) = lcm(n+2, n-2)
%o (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))
%o (Magma) [Lcm(n-2, n+2): n in [1..60]]; // _Vincenzo Librandi_, Nov 10 2014
%Y Cf. A066830 (k=1), A249860 (k=3), A060819.
%K nonn,easy
%O 1,1
%A _Colin Barker_, Nov 07 2014