Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #22 Aug 21 2022 04:19:10
%S 1,5,5,9,9,13,13,17,17,21,21,25,25,29,29,33,33,37,37,41,41,45,45,49,
%T 49,53,53,57,57,61,61,65,65,69,69,73,73,77,77,81,81,85,85,89,89,93,93,
%U 97,97,101,101,105,105,109,109,113,113,117,117,121,121,125,125,129,129,133
%N a(n) = 2*n + (-1)^n.
%H G. C. Greubel, <a href="/A163980/b163980.txt">Table of n, a(n) for n = 1..5000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F a(n) = A005843(n) - (-1)^A001477(n).
%F a(n) = 2*A000027(n) + (-1)^A000027(n).
%F a(n) = A005843(n) + A033999(n).
%F From _R. J. Mathar_, Aug 21 2009: (Start)
%F a(n) = a(n-1) + a(n-2) - a(n-3).
%F G.f.: x*(1+4*x-x^2)/((1+x)*(1-x)^2). (End)
%F a(n) = 4*n - 2 - a(n-1), with a(1)=1. - _Vincenzo Librandi_, Nov 30 2010
%F E.g.f.: (2*x+1)*cosh(x) +(2*x-1)* sinh(x) -1. - _G. C. Greubel_, Aug 24 2017
%F Sum_{n>=1} 1/a(n)^2 = Pi^2/8 + G - 1, where G is Catalan's constant (A006752). - _Amiram Eldar_, Aug 21 2022
%t LinearRecurrence[{1, 1, -1}, {1, 5, 5}, 50] (* or *) Table[2*n + (-1)^n, {n,1,50}] (* _G. C. Greubel_, Aug 24 2017 *)
%o (PARI) a(n)=n+n+(-1)^n \\ _Charles R Greathouse IV_, Jun 09 2011
%Y Cf. A000027, A004442, A005843, A006752, A033999.
%K nonn,easy
%O 1,2
%A _Juri-Stepan Gerasimov_, Aug 09 2009
%E Link by _Charles R Greathouse IV_, Mar 25 2010