OFFSET
1,1
LINKS
FORMULA
a(n) = 8*n - a(n-1) - 7, n > 1. - Vincenzo Librandi, Aug 05 2010
From R. J. Mathar, Dec 05 2011: (Start)
a(n) = 4*n - (3 + (-1)^n)/2.
G.f.: x*(3+3*x+2*x^2) / ( (1+x)*(x-1)^2 ). (End)
From Franck Maminirina Ramaharo, Aug 06 2018: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3), n > 3.
a(n) = 4*n + (n mod 2) - 2.
a(n) = A047470(n) + 3.
a(2*n) = A017137(n-1).
a(2*n-1) = A017101(n-1).
E.g.f.: ((8*x - 3)*exp(x) - exp(-x) + 4)/2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2)*Pi/16 + log(2)/8 - sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 18 2021
MAPLE
MATHEMATICA
Flatten[# + {3, 6} & /@ (8 Range[0, 28])] (* Arkadiusz Wesolowski, Sep 25 2012 *)
LinearRecurrence[{1, 1, -1}, {3, 6, 11}, 60] (* Harvey P. Dale, Oct 26 2020 *)
PROG
(Maxima) makelist(4*n + mod(n, 2) - 2, n, 1, 100); /* Franck Maminirina Ramaharo, Aug 06 2018 */
(Python)
def A047398(n): return ((n<<2)|(n&1))-2 # Chai Wah Wu, Mar 30 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved