# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a213396 Showing 1-1 of 1 %I A213396 #28 Dec 23 2017 04:48:36 %S A213396 0,3,9,21,42,72,114,171,243,333,444,576,732,915,1125,1365,1638,1944, %T A213396 2286,2667,3087,3549,4056,4608,5208,5859,6561,7317,8130,9000,9930, %U A213396 10923,11979,13101,14292,15552,16884,18291,19773,21333,22974,24696 %N A213396 Number of (w,x,y) with all terms in {0,...,n} and 2*w < |x+y-w|. %C A213396 For a guide to related sequences, see A212959. %C A213396 Also, integer values of (m^3+1)/3 for m>0. - _Bruno Berselli_, Jan 19 2013 %H A213396 Index entries for linear recurrences with constant coefficients, signature (3,-3,2,-3,3,-1). %F A213396 a(n) = (n+2)*(n+1)*n/3 + floor((n-1)/3) + 1. %F A213396 a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) - 3*a(n-4) + 3*a(n-5) - a(n-6). %F A213396 G.f.: 3*x*(1 + x^2)/((1 - x)^4*(1 + x + x^2)). %F A213396 a(n) + A213397(n) = (n+1)^3. %F A213396 a(n) = 3*A060999(n). - _Bruno Berselli_, Dec 22 2017 %t A213396 t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[2 w < Abs[x + y - w], s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]]; m = Map[t[#] &, Range[0, 60]] %t A213396 CoefficientList[ Series[(3 (x + x^3))/((-1 + x)^4 (1 + x + x^2)), {x, 0, 41}], x] (* or *) %t A213396 LinearRecurrence[{3, -3, 2, -3, 3, -1}, {0, 3, 9, 21, 42, 72}, 41] (* _Robert G. Wilson v_, Dec 22 2017 *) %o A213396 (PARI) x='x+O('x^99); concat([0], Vec(3*x*(1+x^2)/((1-x)^4*(1+x+x^2)))) \\ _Altug Alkan_, Dec 22 2017 %Y A213396 Cf. A060999, A212959, A213397. %K A213396 nonn,easy %O A213396 0,2 %A A213396 _Clark Kimberling_, Jun 12 2012 %E A213396 Corrected the title. _Robert G. Wilson v_, Dec 22 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE