The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A083220 a(n) = n + (n mod 4). 6
 0, 2, 4, 6, 4, 6, 8, 10, 8, 10, 12, 14, 12, 14, 16, 18, 16, 18, 20, 22, 20, 22, 24, 26, 24, 26, 28, 30, 28, 30, 32, 34, 32, 34, 36, 38, 36, 38, 40, 42, 40, 42, 44, 46, 44, 46, 48, 50, 48, 50, 52, 54, 52, 54, 56, 58, 56, 58, 60, 62, 60, 62, 64, 66, 64, 66, 68, 70, 68, 70, 72, 74 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 LINKS Stefano Spezia, Table of n, a(n) for n = 0..10000 Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1). FORMULA a(n) = 2*A083219(n). a(n) = a(n-1) + 2*(n mod 2 + (n mod 4 -1)*(1- n mod 2)), a(0)=0. a(n) = 2 + (1/6)*Sum_{k=0..n} (7*(k mod 4) + ((k+1) mod 4) + ((k+2) mod 4) - 5*((k+3) mod 4)), with n >= 0. - Paolo P. Lava, Oct 06 2008 a(n) = (3 - (-1)^n - (1+i)*(-i)^n - (1-i)*i^n + 2*n)/2 where i=sqrt(-1). - Colin Barker, Oct 13 2014 G.f.: -2*x*(x^3-x^2-x-1) / ((x-1)^2*(x+1)*(x^2+1)). - Colin Barker, Oct 13 2014 For n > 4, a(n) = a(n-4) + 4. - Zak Seidov, Feb 23 2017 G.f.: 1/(1-x)^2 + 1/(2*(1-x)) - 1/(2*(1+x)) - (1+x)/(1+x^2). - Michael Somos, Feb 23 2017 E.g.f.: (1 + x)*cosh(x) - cos(x) + (2 + x)*sinh(x) - sin(x). - Stefano Spezia, May 28 2021 EXAMPLE G.f. = 2*x + 4*x^2 + 6*x^3 + 4*x^4 + 6*x^5 + 8*x^6 + 10*x^7 + 8*x^8 + 10*x^9 + ... MATHEMATICA a[n_] := Mod[n, 4] + n; (* Michael Somos, Feb 23 2017 *) PROG (PARI) concat(0, Vec(-2*x*(x^3-x^2-x-1)/((x-1)^2*(x+1)*(x^2+1)) + O(x^100))) \\ Colin Barker, Oct 13 2014 (PARI) {a(n) = n%4 + n}; /* Michael Somos, Feb 23 2017 */ CROSSREFS Cf. A010873 (n mod 4), A083219. Sequence in context: A337937 A138125 A098793 * A085896 A107701 A293812 Adjacent sequences:  A083217 A083218 A083219 * A083221 A083222 A083223 KEYWORD nonn,easy AUTHOR Reinhard Zumkeller, Apr 22 2003 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 18 17:32 EDT 2021. Contains 345120 sequences. (Running on oeis4.)