cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-20 of 76 results. Next

A213479 Number of (w,x,y) with all terms in {0,...,n} and |w-x|+|x-y| = w+x+y.

Original entry on oeis.org

1, 4, 11, 18, 30, 41, 58, 73, 95, 114, 141, 164, 196, 223, 260, 291, 333, 368, 415, 454, 506, 549, 606, 653, 715, 766, 833, 888, 960, 1019, 1096, 1159, 1241, 1308, 1395, 1466, 1558, 1633, 1730, 1809, 1911, 1994, 2101, 2188, 2300, 2391, 2508, 2603, 2725, 2824
Offset: 0

Views

Author

Clark Kimberling, Jun 13 2012

Keywords

Comments

a(n) + A213480(n) = (n+1)^3.
For a guide to related sequences, see A212959.

Crossrefs

Cf. A212959.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[w + x + y == Abs[w - x] + Abs[x - y], s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    Map[t[#] &, Range[0, 60]]   (* A213479 *)
  • PARI
    Vec((1+3*x+5*x^2+x^3-x^4)/((1-x)^3*(1+x)^2) + O(x^100)) \\ Colin Barker, Jan 27 2016

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
G.f.: (1 + 3*x + 5*x^2 + x^3 - x^4)/((1 - x)^3 * (1 + x)^2).
From Colin Barker, Jan 27 2016: (Start)
a(n) = (18*n^2+2*(-1)^n*n+42*n+5*(-1)^n+11)/16.
a(n) = (9*n^2+22*n+8)/8 for n even.
a(n) = (9*n^2+20*n+3)/8 for n odd. (End)

A212683 Number of (w,x,y,z) with all terms in {1,...,n} and |x-y| = w + |y-z|.

Original entry on oeis.org

0, 0, 2, 8, 22, 46, 84, 138, 212, 308, 430, 580, 762, 978, 1232, 1526, 1864, 2248, 2682, 3168, 3710, 4310, 4972, 5698, 6492, 7356, 8294, 9308, 10402, 11578, 12840, 14190, 15632, 17168, 18802, 20536, 22374, 24318, 26372, 28538, 30820
Offset: 0

Views

Author

Clark Kimberling, May 24 2012

Keywords

Comments

For a guide to related sequences, see A211795.
Also the number of (w,x,y) with all terms in {0,...,n-1} and |w-x| < |x-y|, see A212959. - Clark Kimberling, Jun 02 2012

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[Abs[x - y] == w + Abs[y - z], s = s + 1],
    {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
    Map[t[#] &, Range[0, 40]]   (* A212683 *)
    %/2  (* A019298 *)
    LinearRecurrence[{3, -2, -2, 3, -1}, {0, 0, 2, 8, 22}, 40]

Formula

a(n) = 2*A019298(n-1) for n>=1.
a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5).
G.f.: (2*x^2 + 2*x^3 + 2*x^4)/(1 - 3*x + 2*x^2 + 2*x^3 - 3*x^4 + x^5).
a(n) + A212684(n) = n^3. - Clark Kimberling, Jun 02 2012 [corrected by Jason Yuen, Aug 19 2025]
a(n) = (2*n^3 - 3*n^2 + 2*n - (n mod 2))/4. - Ayoub Saber Rguez, Sep 02 2021

A212965 Number of triples (w,x,y) with all terms in {0,...,n} and such that w = max(w,x,y) - min(w,x,y).

Original entry on oeis.org

1, 4, 12, 21, 37, 52, 76, 97, 129, 156, 196, 229, 277, 316, 372, 417, 481, 532, 604, 661, 741, 804, 892, 961, 1057, 1132, 1236, 1317, 1429, 1516, 1636, 1729, 1857, 1956, 2092, 2197, 2341, 2452, 2604, 2721, 2881, 3004, 3172, 3301, 3477, 3612
Offset: 0

Views

Author

Clark Kimberling, Jun 02 2012

Keywords

Comments

For a guide to related sequences, see A212959.

Crossrefs

Programs

  • 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, 50]]   (* A212965 *)

Formula

a(n) = (14*n*(n+1) + (2*n+1)*(-1)^n + 7)/8.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
G.f.: (1 + 3*x + 6*x^2 + 3*x^3 + x^4)/((1 + x)^2*(1 - x)^3).
From Ayoub Saber Rguez, Dec 06 2021: (Start)
a(n) + A213498(n) = (n+1)^3.
a(n) = (7*n^2 + 8*n + 4 - (2*n+1)*(n mod 2))/4. (End)

A213389 Number of (w,x,y) with all terms in {0,...,n} and max(w,x,y) < 2*min(w,x,y).

Original entry on oeis.org

0, 1, 2, 9, 16, 35, 54, 91, 128, 189, 250, 341, 432, 559, 686, 855, 1024, 1241, 1458, 1729, 2000, 2331, 2662, 3059, 3456, 3925, 4394, 4941, 5488, 6119, 6750, 7471, 8192, 9009, 9826, 10745, 11664, 12691, 13718, 14859, 16000, 17261, 18522
Offset: 0

Views

Author

Clark Kimberling, Jun 11 2012

Keywords

Comments

For a guide to related sequences, see A212959.

Crossrefs

Cf. A212959.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[Max[w, x, y] < 2*Min[w, x, y], s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 50]]   (* A213389 *)
    LinearRecurrence[{2,1,-4,1,2,-1},{0,1,2,9,16,35},50] (* Harvey P. Dale, Jun 24 2025 *)
  • PARI
    a(n)=n*ceil(n^2/4) \\ Charles R Greathouse IV, Jul 17 2016

Formula

a(n) = (n+1)^3 - A213390(n).
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.: (x + 4*x^3 + x^5)/((1 - x)^4*(1 + x)^2).
a(n) = n * ceiling(n^2/4). - Wesley Ivan Hurt, Jun 15 2013
a(n) = n*(2*n^2+3*(1-(-1)^n))/8. - Luce ETIENNE, Jul 17 2016

A087035 Maximum value taken on by f(P) = Sum_{i=1..n} p(i)*p(n+1-i) as {p(1),p(2),...,p(n)} ranges over all permutations P of {1,2,3,...,n}.

Original entry on oeis.org

0, 1, 4, 13, 28, 53, 88, 137, 200, 281, 380, 501, 644, 813, 1008, 1233, 1488, 1777, 2100, 2461, 2860, 3301, 3784, 4313, 4888, 5513, 6188, 6917, 7700, 8541, 9440, 10401, 11424, 12513, 13668, 14893, 16188, 17557, 19000, 20521, 22120, 23801, 25564, 27413, 29348
Offset: 0

Views

Author

John W. Layman, Jul 31 2003

Keywords

Comments

The corresponding minimum value of f(P) is given by A000292(n)=binomial(n+3,3).
The number of distinct values of f(P) is given by A087034.
Also, number of (w,x,y) with all terms in {0,...,n-1} and 2|w-x| <= max(w,x,y)-min(w,x,y). For a guide to related sequences, see A212959. - Clark Kimberling, Jun 10 2012

Examples

			a(3)=13, since f takes on the values 10 and 13: f({1,2,3})=10, f({1,3,2})=13, f({2,1,3})=13, f({2,3,1})=13, f({3,1,2})=13 and f({3,2,1})=10.
		

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[Max[w, x, y] - Min[w, x, y] >= 2 Abs[w - x],
      s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 45]]

Formula

From Clark Kimberling, Jun 10 2012: (Start)
a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5).
G.f.: (x + x^2 + 3*x^3 - x^4)/(((1 - x)^4)*(1 + x)).
a(n+1) + A213045(n) = (n+1)^3. (End)
a(n) = (2*(n-1)*(n+1)*(2*n+3)-3*(-1)^n+9)/12. - Bruno Berselli, Jun 11 2012

Extensions

a(11) and a(12) from R. J. Mathar, Jun 26 2012
Merged with a sequence of Clark Kimberling by Max Alekseyev, Jun 27 2012
a(0)=0 prepended by Alois P. Heinz, Aug 24 2024

A212684 Number of (w,x,y,z) with all terms in {1,...,n} and |x-y|=n-w+|y-z|.

Original entry on oeis.org

0, 1, 6, 19, 42, 79, 132, 205, 300, 421, 570, 751, 966, 1219, 1512, 1849, 2232, 2665, 3150, 3691, 4290, 4951, 5676, 6469, 7332, 8269, 9282, 10375, 11550, 12811, 14160, 15601, 17136, 18769, 20502, 22339, 24282, 26335, 28500, 30781, 33180
Offset: 0

Views

Author

Clark Kimberling, May 24 2012

Keywords

Comments

For a guide to related sequences, see A211795.
Also the number of (w,x,y) with all terms in {0,...,n-1} and |w-x|>=|x-y|, see A212959. Clark Kimberling, Jun 02 2012

Crossrefs

Cf. A211795.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[Abs[x - y] == n - w + Abs[y - z], s = s + 1],
    {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
    Map[t[#] &, Range[0, 40]]   (* A212684 *)
    LinearRecurrence[{3, -2, -2, 3, -1}, {0, 1, 6, 19, 42}, 41] (* Bruno Berselli, Jun 07 2012 *)
  • Maxima
    makelist(coeff(taylor(x*(1+3*x+3*x^2-x^3)/((1+x)*(1-x)^4), x, 0, n), x, n), n, 0, 40); /* Bruno Berselli, May 07 2012 */

Formula

a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5).
a(n) + A212683(n) = n^3. Clark Kimberling, Jun 02 2012
G.f.: x*(1+3*x+3*x^2-x^3)/((1+x)*(1-x)^4). [Bruno Berselli, Jun 07 2012]
a(n) = (2*n*(n+2)*(2*n-1)-(-1)^n+1)/8. [Bruno Berselli, Jun 07 2012]

A212972 Number of triples (w,x,y) with all terms in {0,...,n} and w >= floor((x+y)/3).

Original entry on oeis.org

1, 8, 24, 53, 100, 168, 261, 384, 540, 733, 968, 1248, 1577, 1960, 2400, 2901, 3468, 4104, 4813, 5600, 6468, 7421, 8464, 9600, 10833, 12168, 13608, 15157, 16820, 18600, 20501, 22528, 24684, 26973, 29400, 31968, 34681, 37544, 40560, 43733
Offset: 0

Views

Author

Clark Kimberling, Jun 03 2012

Keywords

Comments

For a guide to related sequences, see A212959.

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[w >= Floor[(x + y)/3], s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 60]]   (* A212972 *)

Formula

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).
G.f.: (1 + 5x + 3*x^2 + 3*x^3)/((1 + x + x^2)*(1-x)^4).
a(n) = (n+1)^3 - A212971(n).
From Ayoub Saber Rguez, Dec 11 2023: (Start)
a(n) = A011379(n+1) - A212973(n).
a(n) = (2*n^3 + 8*n^2 + 10*n + 4 - (((n+1) mod 3) mod 2))/3. (End)

Extensions

Name corrected by Ayoub Saber Rguez, Jan 09 2024

A212973 Number of triples (w,x,y) with all terms in {0,...,n} and w <= floor((x+y)/3).

Original entry on oeis.org

1, 4, 12, 27, 50, 84, 131, 192, 270, 367, 484, 624, 789, 980, 1200, 1451, 1734, 2052, 2407, 2800, 3234, 3711, 4232, 4800, 5417, 6084, 6804, 7579, 8410, 9300, 10251, 11264, 12342, 13487, 14700, 15984, 17341, 18772, 20280, 21867, 23534
Offset: 0

Views

Author

Clark Kimberling, Jun 03 2012

Keywords

Comments

For a guide to related sequences, see A212959.

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[w <= Floor[(x + y)/3], s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 60]]   (* A212973 *)
    LinearRecurrence[{3,-3,2,-3,3,-1},{1,4,12,27,50,84},50] (* Harvey P. Dale, Jan 24 2015 *)

Formula

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).
G.f.: (1 + x + 3*x^2 + x^3)/((1+x+x^2)*(1-x)^4).
a(n) = (n+1)^3 - A212974(n).
From Ayoub Saber Rguez, Dec 11 2023: (Start)
a(n) = A011379(n+1) - A212972(n).
a(n) = (n^3 + 4*n^2 + 5*n + 2 + (((n+1) mod 3) mod 2))/3. (End)

A212974 Number of (w,x,y) with all terms in {0,...,n} and w>floor((x+y)/3).

Original entry on oeis.org

0, 4, 15, 37, 75, 132, 212, 320, 459, 633, 847, 1104, 1408, 1764, 2175, 2645, 3179, 3780, 4452, 5200, 6027, 6937, 7935, 9024, 10208, 11492, 12879, 14373, 15979, 17700, 19540, 21504, 23595, 25817, 28175, 30672, 33312, 36100, 39039, 42133
Offset: 0

Views

Author

Clark Kimberling, Jun 03 2012

Keywords

Comments

a(n)+A212973(n) = (n+1)^3.
For a guide to related sequences, see A212959.

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[w > Floor[(x + y)/3], s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 60]]   (* A212974 *)

Formula

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).
G.f.: x*(4 + 3*x + 4*x^2 + x^3)/((1 + x + x^2)*(1 - x)^4).

A212977 Number of (w,x,y) with all terms in {0,...,n} and n/2 < w+x+y <= n.

Original entry on oeis.org

0, 3, 6, 16, 25, 46, 64, 100, 130, 185, 230, 308, 371, 476, 560, 696, 804, 975, 1110, 1320, 1485, 1738, 1936, 2236, 2470, 2821, 3094, 3500, 3815, 4280, 4640, 5168, 5576, 6171, 6630, 7296, 7809, 8550, 9120, 9940, 10570, 11473, 12166, 13156
Offset: 0

Views

Author

Clark Kimberling, Jun 04 2012

Keywords

Comments

For a guide to related sequences, see A212959.

Crossrefs

Cf. A212959.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[n/2 < w + x + y <= n, s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 70]]   (* A212977 *)

Formula

a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-4)+3*a(n-5)+a(n-6)-a(n-7).
G.f.: x*(3 + 3*x + x^2)/((1 + x)^3*(1 - x)^4).
a(n) = (14*n^3+75*n^2+109*n-3*((n^2+7*n+11)*(-1)^n-11))/96. - Luce ETIENNE, Mar 21 2014
Previous Showing 11-20 of 76 results. Next