OFFSET
1,1
COMMENTS
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
O.g.f.: x*(3 + 5*x + 3*x^2)/((1 + x)*(1 - x)^2).
E.g.f.: (-1 + 12*exp(x) - 11*exp(2*x) + 22*x*exp(2*x))*exp(-x)/4.
a(n) = -a(-n+1) = a(n-1) + a(n-2) - a(n-3).
a(n) = 5*n - 2 + (2*n - (-1)^n - 3)/4.
a(n) = 4*n - 1 + floor((n - 1)/2) + floor((3*n - 1)/3).
a(n+k) - a(n) = 11*k/2 + (1 - (-1)^k)*(-1)^n/4.
a(n+k) + a(n) = 11*(2*n + k - 1)/2 - (1 + (-1)^k)*(-1)^n/4.
E.g.f.: 3 + ((22*x - 11)*exp(x) - exp(-x))/4. - David Lovler, Aug 08 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(5*Pi/22)*Pi/11. - Amiram Eldar, Feb 27 2023
MATHEMATICA
Table[5 n - 2 + (2 n - (-1)^n - 3)/4, {n, 1, 60}]
CoefficientList[ Series[(3 + 5x + 3x^2)/((x - 1)^2 (x + 1)), {x, 0, 57}], x] (* or *)
LinearRecurrence[{1, 1, -1}, {3, 8, 14}, 58] (* Robert G. Wilson v, Mar 08 2018 *)
PROG
(PARI) vector(60, n, nn; 5*n-2+(2*n-(-1)^n-3)/4)
(Sage) [5*n-2+(2*n-(-1)^n-3)/4 for n in (1..60)]
(Maxima) makelist(5*n-2+(2*n-(-1)^n-3)/4, n, 1, 60);
(GAP) List([1..60], n -> 5*n-2+(2*n-(-1)^n-3)/4);
(Magma) [5*n-2+(2*n-(-1)^n-3)/4: n in [1..60]];
(Python) [5*n-2+(2*n-(-1)**n-3)/4 for n in range(1, 60)]
(Julia) [(11(2n-1)-(-1)^n)>>2 for n in 1:60] # Peter Luschny, Mar 07 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Mar 06 2018
STATUS
approved