A145979 a(n) = (2*n + 4)/gcd(n,4).
1, 6, 4, 10, 3, 14, 8, 18, 5, 22, 12, 26, 7, 30, 16, 34, 9, 38, 20, 42, 11, 46, 24, 50, 13, 54, 28, 58, 15, 62, 32, 66, 17, 70, 36, 74, 19, 78, 40, 82, 21, 86, 44, 90, 23, 94, 48, 98, 25, 102, 52, 106, 27, 110, 56, 114, 29, 118, 60, 122
Offset: 0
References
- L. B. W. Jolley, Summation of Series, Second revised ed., Dover, 1961, p. 38, (201). For the sum given in the comment by Gary Detlefs.
Links
- G. C. Greubel, Table of n, a(n) for n = 0..5000
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,2,0,0,0,-1).
Programs
-
GAP
List([1..70],n->(2*n+4)/Gcd(n,4)); # Muniru A Asiru, Apr 08 2018
-
Magma
[(2*n+4)/GCD(n,4): n in [0..70]]; // Vincenzo Librandi, Jan 29 2016
-
Maple
seq(denom(1/2-1/(n+2)), n=0..25); # Gary Detlefs, Sep 16 2011
-
Mathematica
Table[(2*n + 4)/GCD[n, 4], {n, 0, 50}] (* G. C. Greubel, Jan 29 2016 *) LinearRecurrence[{0, 0, 0, 2, 0, 0, 0, -1}, {1, 6, 4, 10, 3, 14, 8, 18}, 70] (* Vincenzo Librandi, Jan 29 2016 *) CoefficientList[ Series[(-2x^7 + 2x^5 + x^4 + 10x^3 + 4x^2 + 6x + 1)/(x^4 - 1)^2, {x, 0, 60}], x] (* Robert G. Wilson v, Nov 25 2016 *)
-
PARI
a(n) = (2*n + 4)/gcd(n,4); \\ Michel Marcus, Jan 29 2016
-
Sage
a = lambda n: (2 + n) / (2 - (n % 2) / 2 - (n % 4 != 0)) [a(n) for n in range(60)] # Peter Luschny, Jan 17 2015
Formula
From R. J. Mathar, Dec 08 2008: (Start)
a(n) = 2*a(n-4) - a(n-8).
G.f.: (1 + 6x + 4x^2 + 10x^3 + x^4 + 2x^5 - 2x^7) / ((x-1)^2*(1+x)^2*(x^2+1)^2). (End)
a(n) = (n+2)*(11 - 5*(-1)^n - i^n - (-i)^n)/8, where i is the imaginary unit. - Bruno Berselli, Feb 25 2011
a(n) = (2*n + 4)/gcd(n,4). - Joerg Arndt, Jan 17 2015
E.g.f.: (1/4)*(2*(4*x+3)*cosh(x) + (3*x+16)*sinh(x) + x*sin(x) - 2*cos(x)). - G. C. Greubel, Jan 29 2016
a(n) = b(n+2), for b as in comment of Nov 12 2017. Same b is b(n) = (2n)/gcd(2n, n+2). - David Pasino, Feb 20 2018
Sum_{k=0..n} a(k) ~ (11/16) * n^2. - Amiram Eldar, Oct 09 2023
Extensions
Edited by R. J. Mathar, Dec 08 2008
New name from Joerg Arndt, Jan 17 2015
Comments