|
|
A196081
|
|
Dungeons and Dragons Ability Modifier Sequence.
|
|
1
|
|
|
10, 0, 11, 0, 12, 1, 13, 1, 14, 2, 15, 2, 16, 3, 17, 3, 18, 4, 19, 4, 20, 5, 21, 5, 22, 6, 23, 6, 24, 7, 25, 7, 26, 8, 27, 8, 28, 9, 29, 9, 30, 10, 31, 10, 32, 11, 33, 11, 34, 12, 35
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
FORMULA
|
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(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
|
|
|
STATUS
|
approved
|
|
|
|