|
|
A213391
|
|
Number of (w,x,y) with all terms in {0,...,n} and 2*max(w,x,y) < 3*min(w,x,y).
|
|
4
|
|
|
0, 1, 2, 3, 10, 17, 24, 43, 62, 81, 118, 155, 192, 253, 314, 375, 466, 557, 648, 775, 902, 1029, 1198, 1367, 1536, 1753, 1970, 2187, 2458, 2729, 3000, 3331, 3662, 3993, 4390, 4787, 5184, 5653, 6122, 6591, 7138, 7685, 8232, 8863, 9494, 10125
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
For a guide to related sequences, see A212959.
Also the number of (w,x,y) with all terms in {0,...,n-1} and 2*max(w,x,y) <= 3*min(w,x,y).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3) - 4*a(n-4) - a(n-5) + 2*a(n-6) - a(n-7).
G.f.: (x + 4*x^4 + x^7)/(((1 - x)^4)*(1 + x + x^2)^2).
a(n) = (n^3 + 6*n*(((n+1) mod 3 + 1) mod 2) - 2 + 2*((n+1) mod 3))/9. - Ayoub Saber Rguez, Feb 01 2022
a(n) = n^3/9 if n == 0 (mod 3),
(n^3 + 6*n + 2)/9 if n == 1 (mod 3),
(n^3 + 6*n - 2)/9 if n == 2 (mod 3).
(End)
|
|
MATHEMATICA
|
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[2*Max[w, x, y] < 3*Min[w, x, y], s = s + 1],
{w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
m = Map[t[#] &, Range[0, 45]] (* A213391 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|