%I #40 Aug 03 2024 02:31:58
%S 1,11,7,17,13,23,19,29,25,35,31,41,37,47,43,53,49,59,55,65,61,71,67,
%T 77,73,83,79,89,85,95,91,101,97,107,103,113,109,119,115,125,121,131,
%U 127,137,133,143,139,149,145,155,151,161,157,167,163,173,169,179,175,185
%N a(n) = (6*n + 7*(-1)^n + 3)/2.
%H Vincenzo Librandi, <a href="/A166521/b166521.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F a(n) = 6*n - a(n-1), for n > 1, with a(1) = 1.
%F G.f.: x*(1+10*x-5*x^2) / ((1+x)*(1-x)^2). - _R. J. Mathar_, Mar 08 2011
%F From _G. C. Greubel_, May 16 2016: (Start)
%F E.g.f.: (1/2)*(7*exp(-x) + 3*(1+2*x)*exp(x) -10).
%F a(n) = a(n-1) + a(n-2) - a(n-3). (End)
%F Sum_{n>=1} (-1)^(n+1)/a(n) = 1/5 + Pi/(2*sqrt(3)). - _Amiram Eldar_, Feb 24 2023
%t Table[(6 n + 7 (-1)^n + 3)/2, {n, 60}] (* _Vincenzo Librandi_, Sep 13 2013 *)
%t LinearRecurrence[{1,1,-1},{1,11,7},90] (* _Harvey P. Dale_, Apr 29 2018 *)
%o (Magma) [(6*n+7*(-1)^n+3)/2: n in [1..80]]; // _Vincenzo Librandi_, Sep 13 2013
%o (SageMath)
%o def A166521(n): return 3*n -2 +7*((n+1)%2)
%o [A166521(n) for n in range(1,101)] # _G. C. Greubel_, Aug 03 2024
%Y Cf. A166519, A166520, A166522, A166523, A166524, A166525, A166526.
%K nonn,easy
%O 1,2
%A _Vincenzo Librandi_, Oct 16 2009