login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A196081 Dungeons and Dragons Ability Modifier Sequence. 1

%I #35 Jul 16 2022 12:04:36

%S 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,

%T 6,24,7,25,7,26,8,27,8,28,9,29,9,30,10,31,10,32,11,33,11,34,12,35

%N Dungeons and Dragons Ability Modifier Sequence.

%D Rob Heinsoo and Andy Collins and James Wyatt, Wizards of the Coast, 2008, page 17, Dungeons and Dragons Player's Handbook

%H Harvey P. Dale, <a href="/A196081/b196081.txt">Table of n, a(n) for n = 0..999</a>

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,1,0,1,0,-1).

%F a(n+5) = a(n)+a(n+1)-a(n+4)+3. - _Alexander R. Povolotsky_, Sep 27 2011

%F 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

%F 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

%F a(2n) = n+10.

%F a(2n+1) = A004526(n).

%F 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

%t 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 *)

%o (C#)

%o public int Modifier(int score) {int modifier = 0; if (score % 2 == 0) {modifier = score / 2 - 5;} else {modifier = (score -1) / 2 - 5;} return modifier; }

%K nonn,easy

%O 0,1

%A _Daniel Ray_, Sep 27 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)