OFFSET
0,1
REFERENCES
Rob Heinsoo and Andy Collins and James Wyatt, Wizards of the Coast, 2008, page 17, Dungeons and Dragons Player's Handbook
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..999
Index entries for linear recurrences with constant coefficients, signature (0,1,0,1,0,-1).
FORMULA
a(n+5) = a(n)+a(n+1)-a(n+4)+3. - Alexander R. Povolotsky, Sep 27 2011
a(n) = 19/4-(1/8*I)*I^n+1/8*(-1)^n*n+21/4*(-1)^n+3/8*n+(1/8*I)*(-I)^n. - Alexander R. Povolotsky, Sep 27 2011
G.f.: ( 10+x^2-9*x^4+x^5 ) / ( (x^2+1)*(x-1)^2*(1+x)^2 ). - R. J. Mathar, Sep 27 2011
a(2n) = n+10.
a(2n+1) = A004526(n).
a(0)=10, a(1)=0, a(2)=11, a(3)=0, a(4)=12, a(5)=1, a(n)=a(n-2)+a(n-4)- a(n-6). - Harvey P. Dale, Oct 01 2011
MATHEMATICA
LinearRecurrence[{0, 1, 0, 1, 0, -1}, {10, 0, 11, 0, 12, 1}, 60] (* or *) CoefficientList[Series[(10+x^2-9x^4+x^5)/((x^2+1)(x-1)^2(1+x)^2), {x, 0, 60}], x] (* Harvey P. Dale, Oct 01 2011 *)
PROG
(C#)
public int Modifier(int score) {int modifier = 0; if (score % 2 == 0) {modifier = score / 2 - 5; } else {modifier = (score -1) / 2 - 5; } return modifier; }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Daniel Ray, Sep 27 2011
STATUS
approved