# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a196081 Showing 1-1 of 1 %I A196081 #35 Jul 16 2022 12:04:36 %S A196081 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 A196081 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 A196081 Dungeons and Dragons Ability Modifier Sequence. %D A196081 Rob Heinsoo and Andy Collins and James Wyatt, Wizards of the Coast, 2008, page 17, Dungeons and Dragons Player's Handbook %H A196081 Harvey P. Dale, Table of n, a(n) for n = 0..999 %H A196081 Index entries for linear recurrences with constant coefficients, signature (0,1,0,1,0,-1). %F A196081 a(n+5) = a(n)+a(n+1)-a(n+4)+3. - _Alexander R. Povolotsky_, Sep 27 2011 %F A196081 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 A196081 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 A196081 a(2n) = n+10. %F A196081 a(2n+1) = A004526(n). %F A196081 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 A196081 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 A196081 (C#) %o A196081 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 A196081 nonn,easy %O A196081 0,1 %A A196081 _Daniel Ray_, Sep 27 2011 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE