Displaying 1-2 of 2 results found.
page
1
Number of (w,x,y) with all terms in {0,...,n} and w < range{w,x,y}.
+0
3
0, 3, 10, 26, 50, 89, 140, 212, 300, 415, 550, 718, 910, 1141, 1400, 1704, 2040, 2427, 2850, 3330, 3850, 4433, 5060, 5756, 6500, 7319, 8190, 9142, 10150, 11245, 12400, 13648, 14960, 16371, 17850, 19434, 21090, 22857, 24700, 26660, 28700
COMMENTS
For a guide to related sequences, see A212959.
FORMULA
a(n) = (n + 1)*(10*n*(n + 2) - 3*(-1)^n + 3)/24.
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6).
G.f.: f(x)/g(x), where f(x) = x*(3 + 4*x + 3*x^2) and g(x) = ((1 - x)^4)(1 + x)^2.
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[w < (Max[w, x, y] - Min[w, x, y]), s = s + 1],
{w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
Map[t[#] &, Range[0, 60]] (* A212967 *)
Accumulate[Accumulate[Table[n + LCM[n, 2], {n, 0, 60}]]] (* Jon Maiga, Nov 28 2018 *)
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 3, 10, 26, 50, 89}, 50] (* Vincenzo Librandi, Nov 29 2018 *)
PROG
(GAP) List([1..45], n->Sum([1..n], k->(10*k*(k-1)+(2*k-1)*(-1)^k+1)/8)); # Muniru A Asiru, Nov 28 2018
(Magma) [(n+1)*(10*n*(n+2) - 3*(-1)^n+3)/24: n in [0..50]]; // Vincenzo Librandi, Nov 29 2018
Number of (w,x,y) such that w,x,y are all in {0,...,n} and |w-x| = |x-y|.
+0
77
1, 4, 11, 20, 33, 48, 67, 88, 113, 140, 171, 204, 241, 280, 323, 368, 417, 468, 523, 580, 641, 704, 771, 840, 913, 988, 1067, 1148, 1233, 1320, 1411, 1504, 1601, 1700, 1803, 1908, 2017, 2128, 2243, 2360, 2481, 2604, 2731, 2860, 2993, 3128, 3267
COMMENTS
In the following guide to related sequences: M=max(x,y,z), m=min(x,y,z), and R=range=M-m. In some cases, it is an offset of the listed sequence which fits the conditions shown for w,x,y. Each sequence satisfies a linear recurrence relation, some of which are identified in the list by the following code (signature):
A: 2, 0, -2, 1, i.e., a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4);
B: 3, -2, -2, 3, -1;
C: 4, -6, 4, -1;
D: 1, 2, -2, -1, 1;
E: 2, 1, -4, 1, 2, -1;
F: 2, -1, 1, -2, 1;
G: 2, -1, 0, 1, -2, 1;
H: 2, -1, 2, -4, 2, -1, 2, -1;
I: 3, -3, 2, -3, 3, -1;
J: 4, -7, 8, -7, 4, -1.
...
A212959 ... |w-x|=|x-y| ...... recurrence type A
A212960 ... |w-x| != |x-y| ................... B
A212683 ... |w-x| < |x-y| .................... B
A212684 ... |w-x| >= |x-y| ................... B
A212963 ... see entry for definition ......... B
A212964 ... |w-x| < |x-y| < |y-w| ............ B
A006331 ... |w-x| < y ........................ C
A005900 ... |w-x| <= y ....................... C
A212965 ... w = R ............................ D
A212967 ... w < R ............................ E
A212968 ... w >= R ........................... E
A077043 ... w = x > R ........................ A
A212969 ... w != x and x > R ................. E
A212970 ... w != x and x < R ................. E
A011934 ... w < floor((x+y)/2) ............... B
A182260 ... w > floor((x+y)/2) ............... B
A055232 ... w <= floor((x+y)/2) .............. B
A011934 ... w >= floor((x+y)/2) .............. B
A212971 ... w < floor((x+y)/3) ............... B
A212972 ... w >= floor((x+y)/3) .............. B
A212973 ... w <= floor((x+y)/3) .............. B
A212974 ... w > floor((x+y)/3) ............... B
A212975 ... R is even ........................ E
A212976 ... R is odd ......................... E
A212980 ... w < x + y and x < y .............. B
A212981 ... w <= x+y and x < y ............... B
A212982 ... w < x + y and x <= y ............. B
A212983 ... w <= x + y and x <= y ............ B
A002623 ... w >= x + y and x <= y ............ B
A087811 ... w = 2*x + y ...................... A
A008805 ... w = 2*x + 2*y .................... D
A000982 ... 2*w = x + y ...................... F
A001318 ... 2*w = 2*x + y .................... F
A008810 ... 3*x = 2*x + y .................... F
A001972 ... w = 4*x + y ...................... G
A212988 ... 4*w = x + y ...................... G
A016061 ... n < w + x + y <= 2*n ............. C
A000292 ... w + x + y <=n .................... C
A000292 ... 2*n < w + x + y <= 3*n ........... C
A143785 ... w < R < x ........................ E
A005996 ... w < R <= x ....................... E
A128624 ... w <= R <= x ...................... E
A213041 ... R = 2*|w - x| .................... A
A213045 ... R < 2*|w - x| .................... B
A087035 ... R >= 2*|w - x| ................... B
A213388 ... R <= 2*|w - x| ................... B
A171218 ... M < 2*m .......................... B
A213389 ... R < 2|w - x| ..................... E
A213390 ... M >= 2*m ......................... E
A213391 ... 2*M < 3*m ........................ H
A213392 ... 2*M >= 3*m ....................... H
A213393 ... 2*M > 3*m ........................ H
A213391 ... 2*M <= 3*m ....................... H
A047838 ... w = |x + y - w| .................. A
A213396 ... 2*w < |x + y - w| ................ I
A213397 ... 2*w >= |x + y - w| ............... I
A000384 ... max(|w-x|,|x-y|) = |w-y|
A213398 ... min(|w-x|,|x-y|) = x ............. A
A213399 ... max(|w-x|,|x-y|) = x ............. D
A213479 ... max(|w-x|,|x-y|) = w+x+y ......... D
A213480 ... max(|w-x|,|x-y|) != w+x+y ........ E
A006918 ... |w-x| + |x-y| > w+x+y ............ E
A213481 ... |w-x| + |x-y| <= w+x+y ........... E
A213482 ... |w-x| + |x-y| < w+x+y ............ E
A213483 ... |w-x| + |x-y| >= w+x+y ........... E
A213484 ... |w-x|+|x-y|+|y-w| = w+x+y
A213485 ... |w-x|+|x-y|+|y-w| != w+x+y ....... J
A213486 ... |w-x|+|x-y|+|y-w| > w+x+y ........ J
A213487 ... |w-x|+|x-y|+|y-w| >= w+x+y ....... J
A213488 ... |w-x|+|x-y|+|y-w| < w+x+y ........ J
A213489 ... |w-x|+|x-y|+|y-w| <= w+x+y ....... J
A213490 ... w,x,y,|w-x|,|x-y| distinct
A213491 ... w,x,y,|w-x|,|x-y| not distinct
A213493 ... w,x,y,|w-x|,|x-y|,|w-y| distinct
A213495 ... w = min(|w-x|,|x-y|,|w-y|)
A213492 ... w != min(|w-x|,|x-y|,|w-y|)
A213498 ... w != max(|w-x|,|x-y|,|w-y|)
...
A211795 includes a guide for sequences that count 4-tuples (w,x,y,z) having all terms in {0,...,n} and satisfying selected properties. Some of the sequences indexed at A211795 satisfy recurrences that are represented in the above list.
REFERENCES
A. Barvinok, Lattice Points and Lattice Polytopes, Chapter 7 in Handbook of Discrete and Computational Geometry, CRC Press, 1997, 133-152.
P. Gritzmann and J. M. Wills, Lattice Points, Chapter 3.2 in Handbook of Convex Geometry, vol. B, North-Holland, 1993, 765-797.
FORMULA
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
G.f.: (1+2*x+3*x^2)/((1+x)*(1-x)^3).
a(n) = (6*n^2 + 8*n + 3 + (-1)^n)/4. - Luce ETIENNE, Apr 05 2014
EXAMPLE
a(1)=4 counts these (x,y,z): (0,0,0), (1,1,1), (0,1,0), (1,0,1).
Numbers congruent to {1, 3} mod 6: 1, 3, 7, 9, 13, 15, 19, ...
a(0) = 1;
a(1) = 1 + 3 = 4;
a(2) = 1 + 3 + 7 = 11;
a(3) = 1 + 3 + 7 + 9 = 20;
a(4) = 1 + 3 + 7 + 9 + 13 = 33;
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[Abs[w - x] == Abs[x - y], s = s + 1],
{w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
m = Map[t[#] &, Range[0, 50]] (* A212959 *)
Search completed in 0.006 seconds
|