login
A168233
a(n) = 3*n - a(n-1) - 1 for n>0, a(1)=1.
5
1, 4, 4, 7, 7, 10, 10, 13, 13, 16, 16, 19, 19, 22, 22, 25, 25, 28, 28, 31, 31, 34, 34, 37, 37, 40, 40, 43, 43, 46, 46, 49, 49, 52, 52, 55, 55, 58, 58, 61, 61, 64, 64, 67, 67, 70, 70, 73, 73, 76, 76, 79, 79, 82, 82, 85, 85, 88, 88, 91, 91, 94, 94, 97, 97, 100, 100, 103, 103, 106
OFFSET
1,2
FORMULA
From Bruno Berselli, Nov 15 2010: (Start)
a(n) = (6*n + 3*(-1)^n + 1)/4.
G.f.: x*(1 + 3*x - x^2)/((1+x)*(1-x)^2).
a(n) = a(n-1) + a(n-2) - a(n-3), for n>3.
a(n) + a(n-1) = A016789(n-1) for n>1.
a(n) - a(n-1-2*k) = A010674(n-1) + A008585(k) for n>2*k+1 and k in A001477.
a(n) - a(n-2*k) = A008585(k) for n>2*k and k in A001477. (End)
a(n+1) = A016777(floor((n+1)/2)). - R. J. Mathar, Jan 03 2011
E.g.f.: (1/4)*(3 - 4*exp(x) + (1 + 6*x)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 16 2016
MAPLE
a:=n->3*floor(n/2)+1; seq(a(k), k = 1..70); # Wesley Ivan Hurt, Feb 01 2013
MATHEMATICA
CoefficientList[Series[(1 + 3*x - x^2)/((1+x) * (1-x)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Feb 02 2013 *)
LinearRecurrence[{1, 1, -1}, {1, 4, 4}, 80] (* Harvey P. Dale, Oct 13 2015 *)
PROG
(Magma) [(6*n + 3*(-1)^n + 1)/4: n in [1..70]]; // Vincenzo Librandi, Feb 02 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 21 2009
STATUS
approved