OFFSET
1,2
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
a(n) = floor(13*n/2) = (26*n + (-1)^n - 1)/4 with n>1, a(1)=1.
a(n) = a(n-1) + a(n-2) - a(n-3) for n>4.
G.f.: -x*(5*x^3-5*x^2-12*x-1) / ((x-1)^2*(x+1)). - Colin Barker, Nov 06 2015
EXAMPLE
For n=1, there are twelve equally likely outcomes, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 and the smallest of these is 1, so a(1)=1.
MATHEMATICA
Join[{1}, Table[(26 n + (-1)^n - 1)/4, {n, 2, 50}]]
PROG
(PARI) a(n)=if(n<2, 1, 13*n\2);
vector(50, n, a(n))
(PARI) a(n) = if(n<2, n, (26*n + (-1)^n - 1)/4);
vector(50, n, a(n))
(PARI) Vec(-x*(5*x^3-5*x^2-12*x-1)/((x-1)^2*(x+1)) + O(x^100)) \\ Colin Barker, Nov 06 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gianmarco Giordano, Nov 06 2015
STATUS
approved