cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A249859 Least common multiple of n + 2 and n - 2.

Original entry on oeis.org

3, 0, 5, 6, 21, 8, 45, 30, 77, 24, 117, 70, 165, 48, 221, 126, 285, 80, 357, 198, 437, 120, 525, 286, 621, 168, 725, 390, 837, 224, 957, 510, 1085, 288, 1221, 646, 1365, 360, 1517, 798, 1677, 440, 1845, 966, 2021, 528, 2205, 1150, 2397, 624, 2597, 1350, 2805
Offset: 1

Views

Author

Colin Barker, Nov 07 2014

Keywords

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.

Examples

			a(8) = 30 because lcm(8 + 2, 8 - 2) = lcm(6, 10) = 30.
		

Crossrefs

Cf. A066830 (k=1), A249860 (k=3), A060819.

Programs

  • Magma
    [Lcm(n-2, n+2): n in [1..60]]; // Vincenzo Librandi, Nov 10 2014
  • Maple
    A249859:=n-> ilcm(n+2,n-2): seq(A249859(n), n=1..100); # Wesley Ivan Hurt, Jul 09 2017
  • 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 *)
  • 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))
    

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