login
A166520
a(n) = (10*n + 11*(-1)^n + 5)/4.
8
1, 9, 6, 14, 11, 19, 16, 24, 21, 29, 26, 34, 31, 39, 36, 44, 41, 49, 46, 54, 51, 59, 56, 64, 61, 69, 66, 74, 71, 79, 76, 84, 81, 89, 86, 94, 91, 99, 96, 104, 101, 109, 106, 114, 111, 119, 116, 124, 121, 129, 126, 134, 131, 139, 136, 144, 141, 149, 146, 154, 151, 159
OFFSET
1,2
FORMULA
a(n) = 5*n - a(n-1) for n > 1, with a(1) = 1.
G.f. x*(1+8*x-4*x^2) / ( (1+x)*(1-x)^2 ). - R. J. Mathar, Mar 08 2011
From G. C. Greubel, May 16 2016: (Start)
E.g.f.: (5*(1 + 2*x)*exp(x) + 11*exp(-x) - 16)/4.
a(n) = a(n-1) + a(n-2) - a(n-3). (End)
MATHEMATICA
Table[5 n / 2 + 11 (-1)^n / 4 + 5 / 4, {n, 100}] (* Vincenzo Librandi, Sep 13 2013 *)
PROG
(Magma) [5*n/2 + 11*(-1)^n/4 +5/4: n in [1..80]]; // Vincenzo Librandi, Sep 13 2013
(SageMath)
def A166520(n): return (5*n -3 +11*((n+1)%2))//2
[A166520(n) for n in range(1, 101)] # G. C. Greubel, Aug 03 2024
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Oct 16 2009
STATUS
approved