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 51-60 of 76 results. Next

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

Original entry on oeis.org

0, 4, 16, 44, 92, 168, 276, 424, 616, 860, 1160, 1524, 1956, 2464, 3052, 3728, 4496, 5364, 6336, 7420, 8620, 9944, 11396, 12984, 14712, 16588, 18616, 20804, 23156, 25680, 28380, 31264, 34336, 37604, 41072, 44748, 48636, 52744, 57076
Offset: 0

Views

Author

Clark Kimberling, Jun 01 2012

Keywords

Comments

a(n)+A212959(n)=(n+1)^3. Every term is divisible by 4.
For a guide to related sequences, see A212959.

Crossrefs

Cf. A212959.

Programs

  • 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, 45]]   (* A212960 *)
    m/4 (* integers *)

Formula

a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5).
G.f.: f(x)/g(x), where f(x)=4x(1+x^2+x^3) and g(x)=(1+x)(1-x)^4.
a(n) = (4*n^3 + 6*n^2 + 4*n+1 - (-1)^n)/4. - Luce ETIENNE, Apr 05 2014
E.g.f.: (x*(7 + 9*x + 2*x^2)*cosh(x) + (1 + 7*x + 9*x^2 + 2*x^3)*sinh(x))/2. - Stefano Spezia, Aug 11 2025

A212963 a(n) = number of ordered triples (w,x,y) such that w,x,y are all in {0,...,n} and the numbers |w-x|, |x-y|, |y-w| are distinct.

Original entry on oeis.org

0, 0, 0, 12, 36, 84, 156, 264, 408, 600, 840, 1140, 1500, 1932, 2436, 3024, 3696, 4464, 5328, 6300, 7380, 8580, 9900, 11352, 12936, 14664, 16536, 18564, 20748, 23100, 25620, 28320, 31200, 34272, 37536, 41004, 44676, 48564, 52668, 57000
Offset: 0

Views

Author

Clark Kimberling, Jun 02 2012

Keywords

Comments

For each n, there are (n+1)^3 ordered triples, ranging in lexicographical order from (0,0,0) to (n,n,n). For n = 3, the ordered triples (w,x,y) for which |w-x|, |x-y|, |y-w| are distinct are listed in the Example.
For a guide to related sequences, see A212959.
The ambiguous term "ordered triple" here means that the order matters: (w,x,y) is a different triple from (w,y,x), etc. It does not mean that wN. J. A. Sloane, Dec 28 2021

Examples

			a(3) counts the 12 ordered triples in the first column of the following list:
(w,x,y) (|w-x|,|x-y|,|y-w|)
----------------------------
(0,1,3)      (1,2,3)
(0,2,3)      (2,1,3)
(0,3,1)      (3,2,1)
(0,3,2)      (3,1,2)
(1,0,3)      (1,3,2)
(1,3,0)      (2,3,1)
(2,0,3)      (2,3,1)
(2,3,0)      (1,3,2)
(3,0,1)      (3,1,2)
(3,0,2)      (3,2,1)
(3,1,0)      (2,1,3)
(3,2,0)      (1,2,3)
		

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}},
    Module[{s = 0}, (Do[If[Abs[w - x] != Abs[x - y] && Abs[x - y] != Abs[y - w] &&
    Abs[y - w] != Abs[w - x], s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 45]]   (*A212963*)
    m/12 (*essentially A002623*)

Formula

a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5).
G.f.: 12*x^3/((1 + x)*(1 - x)^4).
a(n+3) = 12*A002623(n).
a(n) = (2*n^3 - 3*n^2 - 2*n + 3*(n mod 2))/2. - Ayoub Saber Rguez, Dec 06 2021

Extensions

Definition corrected by Clark Kimberling, Dec 28 2021

A212966 Number of (w,x,y) with all terms in {0,...,n} and 2*w=range{w,x,y}.

Original entry on oeis.org

1, 1, 3, 8, 10, 12, 23, 25, 29, 44, 48, 52, 73, 77, 83, 108, 114, 120, 151, 157, 165, 200, 208, 216, 257, 265, 275, 320, 330, 340, 391, 401, 413, 468, 480, 492, 553, 565, 579, 644, 658, 672, 743, 757, 773, 848, 864, 880, 961, 977, 995, 1080, 1098
Offset: 0

Views

Author

Clark Kimberling, Jun 02 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[2 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]]   (* A212966 *)

Formula

a(n) = a(n-2)+2*a(n-3)-2*a(n-5)-a(n-6)+a(n-8).
G.f.: f(x)/g(x), where f(x)=1 + x + 2*x^2 + 5*x^3 + 5*x^4 and g(x)=(1+x)((1-x)^3)(1+x+x^2)^2.

A212980 Number of (w,x,y) with all terms in {0,...,n} and w

Original entry on oeis.org

0, 1, 6, 17, 37, 68, 113, 174, 254, 355, 480, 631, 811, 1022, 1267, 1548, 1868, 2229, 2634, 3085, 3585, 4136, 4741, 5402, 6122, 6903, 7748, 8659, 9639, 10690, 11815, 13016, 14296, 15657, 17102, 18633, 20253, 21964, 23769, 25670, 27670
Offset: 1

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 < x + y && x < y, s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 60]]   (* A212980 *)

Formula

a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5).
G.f.: (x + 3*x^2 + x^3)/((1 + x)*(1 - x)^4).
From Ayoub Saber Rguez, Oct 08 2021: (Start)
a(n) = A212981(n) - A002620(n+1).
a(n) = (10*n^3 + 15*n^2 + 2*n - 3 + 3*((n+1) mod 2))/24. (End)

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

Original entry on oeis.org

1, 1, 3, 6, 8, 12, 17, 21, 27, 34, 40, 48, 57, 65, 75, 86, 96, 108, 121, 133, 147, 162, 176, 192, 209, 225, 243, 262, 280, 300, 321, 341, 363, 386, 408, 432, 457, 481, 507, 534, 560, 588, 617, 645, 675, 706, 736, 768, 801, 833, 867, 902, 936, 972, 1009
Offset: 0

Views

Author

Clark Kimberling, Jun 04 2012

Keywords

Comments

For a guide to related sequences, see A212959.

Crossrefs

Cf. A212959.

Programs

  • Magma
    [1 + Floor(2*n/3) + Floor(n^2/3) : n in [0..80]]; // Wesley Ivan Hurt, Jul 25 2016
  • Maple
    A212984:=n->1 + floor(2*n/3) + floor(n^2/3): seq(A212984(n), n=0..100); # Wesley Ivan Hurt, Jul 25 2016
  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[3 w == x + y, s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 70]]   (* A212984 *)

Formula

a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5) for n>4.
G.f.: f(x)/g(x), where f(x) = 1 - x + 2*x^2 and g(x) = (1+x+x^2)*(1-x)^3.
a(n) = 1 + floor(2*n/3) + floor(n^2/3). - Wesley Ivan Hurt, Jul 25 2016

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

Original entry on oeis.org

1, 2, 3, 7, 9, 11, 18, 21, 24, 34, 38, 42, 55, 60, 65, 81, 87, 93, 112, 119, 126, 148, 156, 164, 189, 198, 207, 235, 245, 255, 286, 297, 308, 342, 354, 366, 403, 416, 429, 469, 483, 497, 540, 555, 570, 616, 632, 648, 697, 714, 731, 783, 801, 819, 874
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[3 w == 3 x + y, s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 70]]   (* A212985 *)

Formula

a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7).
G.f.: f(x)/g(x), where f(x) = 1 + x + x^2 + 2*x^3 and g(x) = ((1+x+x^2)^2)*((1-x)^3).

A212987 Number of (w,x,y) with all terms in {0,...,n} and 3*w = 2*x+2*y.

Original entry on oeis.org

1, 1, 3, 5, 8, 10, 16, 18, 25, 29, 37, 41, 52, 56, 68, 74, 87, 93, 109, 115, 132, 140, 158, 166, 187, 195, 217, 227, 250, 260, 286, 296, 323, 335, 363, 375, 406, 418, 450, 464, 497, 511, 547, 561, 598, 614, 652, 668, 709, 725, 767, 785, 828, 846, 892
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[3 w == 2 x + 2 y, s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 70]]   (* A212987 *)

Formula

a(n) = 2*a(n-2)+a(n-3)-a(n-4)-2*a(n-5)+a(n-7).
G.f.: f(x)/g(x), where f(x) = 1 + x + x^2 + 2*x^3 + 2*x^4 and g(x) = (1 + x + x^2)((1+x)^2)((1-x)^3).

A212988 Number of (w,x,y) with all terms in {0,...,n} and 4*w = x+y.

Original entry on oeis.org

1, 1, 2, 4, 7, 9, 12, 16, 21, 25, 30, 36, 43, 49, 56, 64, 73, 81, 90, 100, 111, 121, 132, 144, 157, 169, 182, 196, 211, 225, 240, 256, 273, 289, 306, 324, 343, 361, 380, 400, 421, 441, 462, 484, 507, 529, 552, 576, 601, 625, 650, 676, 703, 729, 756, 784
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[4 w == x + y, s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 70]]   (* A212988 *)

Formula

a(n) = 2*a(n-1)-a(n-2)+a(n-4)-2*a(n-5)+a(n-6).
G.f.: f(x)/g(x), where f(x) = 1 - x + x^2 + x^3
and g(x) = (1 + x + x^2 + x^3)(1-x)^3.

A212989 Number of (w,x,y) with all terms in {0,...,n} and 4*w = 4*x+y.

Original entry on oeis.org

1, 2, 3, 4, 9, 11, 13, 15, 24, 27, 30, 33, 46, 50, 54, 58, 75, 80, 85, 90, 111, 117, 123, 129, 154, 161, 168, 175, 204, 212, 220, 228, 261, 270, 279, 288, 325, 335, 345, 355, 396, 407, 418, 429, 474, 486, 498, 510, 559, 572, 585, 598, 651, 665, 679, 693
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[4 w == 4 x + y, s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 70]]   (* A212989 *)
    LinearRecurrence[{1,0,0,2,-2,0,0,-1,1},{1,2,3,4,9,11,13,15,24},60] (* Harvey P. Dale, Sep 20 2023 *)

Formula

a(n) = a(n-1)+2*a(n-3)-2*a(n-4)-a(n-7)+a(n-8).
G.f.: f(x)/g(x), where f(x) = 1 + x + x^2 + x^3 + 3*x^4 and g(x) = ((1 + x + x^2 + x^3)^2)(1-x)^3.

A213041 Number of triples (w,x,y) with all terms in {0..n} and 2*|w-x| = max(w,x,y) - min(w,x,y).

Original entry on oeis.org

1, 2, 7, 12, 21, 30, 43, 56, 73, 90, 111, 132, 157, 182, 211, 240, 273, 306, 343, 380, 421, 462, 507, 552, 601, 650, 703, 756, 813, 870, 931, 992, 1057, 1122, 1191, 1260, 1333, 1406, 1483, 1560, 1641, 1722, 1807, 1892, 1981, 2070, 2163, 2256
Offset: 0

Views

Author

Clark Kimberling, Jun 10 2012

Keywords

Comments

See A212959 for a guide to related sequences.
For n > 3, a(n-2) is the number of distinct values of the magic constant in a perimeter-magic (n-1)-gon of order n (see A342819). - Stefano Spezia, Mar 23 2021

Crossrefs

Cf. A002620, A004526, A058331, A212959, A168277 (first differences), A342819.

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]]   (* A213041 *)
  • PARI
    Vec((1+3*x^2)/((1-x)^3*(1+x)) + O(x^99)) \\ Altug Alkan, May 06 2016

Formula

a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n > 3.
G.f.: (1 + 3*x^2)/((1 - x)^3 * (1 + x)).
a(n) = (n+1)^2 - 2*A004526(n-1) - 2. - Wesley Ivan Hurt, Jul 15 2013
a(n) = A002620(n+2) + 3*A002620(n). - R. J. Mathar, Jul 15 2013
a(n)+a(n+1) = A058331(n+1). - R. J. Mathar, Jul 15 2013
a(n) = n*(n+1) + (1+(-1)^n)/2. - Wesley Ivan Hurt, May 06 2016
E.g.f.: x*(x + 2)*exp(x) + cosh(x). - Ilya Gutkovskiy, May 06 2016
a(n) = A000384(n+1) - A137932(n+2). - Federico Provvedi, Aug 17 2023
Previous Showing 51-60 of 76 results. Next