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 31-40 of 54 results. Next

A243211 Triangle T(n, k) = Numbers of ways to place k points on a triangular grid of side n so that no three of them are vertices of an equilateral triangle with sides parallel to the grid. Triangle read by rows.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 6, 15, 15, 3, 1, 10, 45, 107, 128, 63, 10, 1, 15, 105, 428, 1062, 1566, 1276, 507, 69, 1, 21, 210, 1282, 5160, 13971, 25191, 29235, 20508, 7747, 1251, 42, 1, 1, 28, 378, 3198, 18591, 77124, 231090, 498097, 759117, 792942, 540361, 222597, 49053
Offset: 1

Views

Author

Heinrich Ludwig, Jun 09 2014

Keywords

Comments

The triangle T(n, k) is irregularly shaped: 0 <= k <= A227308(n). First row corresponds to n = 1.
The maximal number of points that can be placed on a triangular grid of side n so that no three of them form an equilateral triangle with sides parallel to the grid is given by A227308(n).

Examples

			The triangle begins:
  1,  1;
  1,  3,   3;
  1,  6,  15,   15,    3;
  1, 10,  45,  107,  128,    63,    10,
  1, 15, 105,  428, 1062,  1566,  1276,   507,    69,
  1, 21, 210, 1282, 5160, 13971, 25191, 29235, 20508, 7747, 1251, 42, 1;
  ...
There is T(6, 12) = 1 way to place 12 points (x) on the grid obeying the rule in the definition of the sequence:
           .
          x x
         x . x
        x . . x
       x . . . x
      . x x x x .
		

Crossrefs

Cf. A227308, A243207, A084546, A234251, A239567, A240439, A194136, A000217 (column 2), A050534 (column 3), A243212 (column 4), A243213 (column 5), A243214 (column 6).

A243212 Number of ways to place 3 points on a triangular grid of side n so that no three of them are vertices of an equilateral triangle with sides parallel to the grid.

Original entry on oeis.org

0, 15, 107, 428, 1282, 3198, 7022, 14020, 26000, 45445, 75665, 120960, 186802, 280028, 409052, 584088, 817392, 1123515, 1519575, 2025540, 2664530, 3463130, 4451722, 5664828, 7141472, 8925553, 11066237, 13618360, 16642850, 20207160, 24385720, 29260400, 34920992
Offset: 2

Views

Author

Heinrich Ludwig, Jun 09 2014

Keywords

Crossrefs

Programs

  • Magma
    I:=[0,15,107,428,1282,3198,7022,14020]; [n le 8 select I[n] else 6*Self(n-1)-14*Self(n-2)+14*Self(n-3)-14*Self(n-5)+14*Self(n-6)-6*Self(n-7)+Self(n-8): n in [1..40]]; // Vincenzo Librandi, Jun 23 2015
  • Mathematica
    Table[Binomial[n (n + 1)/2, 3] - Floor[(n - 1) (n + 1) (2 n - 1)/8], {n, 2, 40}] (* Vincenzo Librandi, Jun 23 2015 *)
  • PARI
    concat(0, Vec(-x^3*(2*x^3-4*x^2+17*x+15)/((x-1)^7*(x+1)) + O(x^100))) \\ Colin Barker, Jun 09 2014
    

Formula

a(n) = C(n*(n+1)/2, 3) - floor((n-1)*(n+1)*(2*n-1)/8).
a(n) = C(n*(n+1)/2, 3) - A002717(n-1).
a(n) = (-3+3*(-1)^n+20*n+8*n^2-23*n^3-3*n^4+3*n^5+n^6)/48. - Colin Barker, Jun 09 2014
G.f.: -x^3*(2*x^3-4*x^2+17*x+15) / ((x-1)^7*(x+1)). - Colin Barker, Jun 09 2014

A243213 Number of ways to place 4 points on a triangular grid of side length n so that no three of them are vertices of an equilateral triangle with sides parallel to the grid.

Original entry on oeis.org

3, 128, 1062, 5160, 18591, 55113, 142005, 329045, 701160, 1395975, 2626953, 4713723, 8120322, 13503350, 21770766, 34153758, 52292385, 78337890, 115072320, 166048850, 235753353, 329791143, 455099307, 620189115, 835418766, 1113301553, 1468849515, 1919958285
Offset: 3

Views

Author

Heinrich Ludwig, Jun 09 2014

Keywords

Examples

			There are exactly a(3) = 3 ways to place 4 points (x) on a 3X3X3 grid, no three of them being vertices of an equilateral triangle:
      .            x            x
     x x          . x          x .
    x . x        x x .        . x x
		

Crossrefs

Programs

  • PARI
    Vec(x^3*(7*x^7-33*x^6-15*x^5-38*x^4-318*x^3-330*x^2-110*x-3)/((x-1)^9*(x+1)^3) + O(x^100)) \\ Colin Barker, Jun 09 2014

Formula

a(n) = (n^8 + 4*n^7 - 6*n^6 - 80*n^5 - 15*n^4 + 532*n^3 - 244*n^2 - 432*n)/384 + IF(MOD(n, 2) = 1)*(-n^2 - n + 12)/16.
G.f.: x^3*(7*x^7-33*x^6-15*x^5-38*x^4-318*x^3-330*x^2-110*x-3) / ((x-1)^9*(x+1)^3). - Colin Barker, Jun 09 2014

A144161 Triangle read by rows: T(n,k) = number of simple graphs on n labeled nodes with k edges that are node-disjoint unions of undirected cycle subgraphs.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 4, 3, 1, 0, 0, 10, 15, 12, 1, 0, 0, 20, 45, 72, 70, 1, 0, 0, 35, 105, 252, 490, 465, 1, 0, 0, 56, 210, 672, 1960, 3720, 3507, 1, 0, 0, 84, 378, 1512, 5880, 16740, 31563, 30016, 1, 0, 0, 120, 630, 3024, 14700, 55800, 157815, 300160, 286884
Offset: 0

Views

Author

Alois P. Heinz, Sep 12 2008

Keywords

Examples

			T(4,3) = 4, because there are 4 simple graphs with 3 edges that are node-disjoint unions of undirected cycle subgraphs:
  .1.2. .1.2. .1-2. .1-2.
  ../|. .|\.. ..\|. .|/..
  .3-4. .3-4. .3.4. .3.4.
T(6,6) = C(6,3)/2+5!/2 = 70.
Triangle begins:
  1;
  1, 0;
  1, 0, 0;
  1, 0, 0,  1;
  1, 0, 0,  4,  3;
  1, 0, 0, 10, 15, 12;
  1, 0, 0, 20, 45, 72, 70;
  ...
		

Crossrefs

Columns k=0, 1+2, 3-4 give: A000012, A000004, A000292, A050534.
Main diagonal gives A001205.
Row sums give: A108246.

Programs

  • Maple
    T:= proc(n,k) option remember; local i,j; if k=0 then 1 elif k<0 or n
    				
  • Mathematica
    T[n_, k_] := T[n, k] = Module[{i, j}, If[k == 0, 1, If[k < 0 || n < k, 0, T[n - 1, k] + Sum[Product[n - i, {i, 1, j}]*T[n - 1 - j, k - j - 1], {j, 2, k}]/2 ]]]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)
  • Python
    from sympy.core.cache import cacheit
    from operator import mul
    from functools import reduce
    @cacheit
    def T(n, k): return 1 if k==0 else 0 if k<0 or nIndranil Ghosh, Aug 07 2017

Formula

T(n,0) = 1, T(n,k) = 0 if k<0 or n

A144209 Triangle T(n,k), n>=0, 0<=k<=n, read by rows: T(n,k) = number of simple graphs on n labeled nodes with k edges where each maximally connected subgraph consists of a single node or has a unique cycle of length 4.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 1, 0, 0, 0, 15, 60, 1, 0, 0, 0, 45, 360, 1080, 1, 0, 0, 0, 105, 1260, 7560, 20580, 1, 0, 0, 0, 210, 3360, 30240, 164640, 430080, 1, 0, 0, 0, 378, 7560, 90720, 740880, 3873240, 9920232, 1, 0, 0, 0, 630, 15120, 226800, 2469600, 19367460, 99406440, 252000000
Offset: 0

Author

Alois P. Heinz, Sep 14 2008

Keywords

Examples

			T(5,4) = 15 = 5*3, because there are 5 possibilities for a single node and T(4,4) = 3:
.1-2. .1-2. .1.2.
.|.|. ..X.. .|X|.
.3-4. .3-4. .3.4.
Triangle begins:
1;
1, 0;
1, 0, 0;
1, 0, 0, 0;
1, 0, 0, 0,  3;
1, 0, 0, 0, 15, 60;
		

Crossrefs

Columns 0, 1+2+3, 4 give: A000012, A000004, A050534.
Main diagonal gives A065889.
Row sums give A144210.
Cf. A007318.

Programs

  • Maple
    T:= proc(n,k) option remember; if k=0 then 1 elif k<0 or n
    				
  • Mathematica
    T[n_, k_] := T[n, k] = Which[k == 0, 1, k < 0 || n < k, 0, k == n, 3*Binomial[n-1, 3]*n^(n-4), True, T[n-1, k] + Sum[Binomial[n-1, j]*T[j+1, j+1]*T[n-1-j, k-j-1], {j, 3, k-1}]]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Aug 29 2014, translated from Maple *)

Formula

T(n,0) = 1, T(n,k) = 0 if k<0 or n

A198148 a(n) = n*(n+2)*(9 - 7*(-1)^n)/16.

Original entry on oeis.org

0, 3, 1, 15, 3, 35, 6, 63, 10, 99, 15, 143, 21, 195, 28, 255, 36, 323, 45, 399, 55, 483, 66, 575, 78, 675, 91, 783, 105, 899, 120, 1023, 136, 1155, 153, 1295, 171, 1443, 190, 1599, 210, 1763, 231, 1935, 253, 2115, 276, 2303, 300, 2499, 325
Offset: 0

Author

Paul Curtz, Oct 21 2011

Keywords

Comments

See, in A181318(n), A060819(n)*A060819(n+p): A060819(n)^2, A064038(n), a(n), A160050(n), A061037(n), A178242(n). The second differences a(n+2)-2*a(n+1)+a(n) = -5, 16, -26, 44, -61, 86, -110, 142, -173, 212, -250, 296, -341, 394, -446, 506, taken modulo 9 are periodic with the palindromic period 4, 7, 1, 8, 2, 5, 7, 7, 7, 5, 2, 8, 1, 7, 4.

Programs

Formula

a(n) = A060819(n)*A060819(n+2).
a(2n) = n*(n+1)/2 = A000217(n).
a(2n+1) = (2*n+1)*(2*n+3) = A000466(n+1).
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6), n>5.
a(n+1) - a(n) = (7*(-1)^n *(2*n^2+6*n+3) +18*n +27)/16.
a(n) = A142705(n) / A000034(n+1).
a(n) = A005563(n) / A010689(n+1). - Franklin T. Adams-Watters, Oct 21 2011
G.f. x*(3 +x +6*x^2 -x^4)/(1-x^2)^3. - R. J. Mathar, Oct 25 2011
a(n)*a(n+1) = a(A028552(n)) = A050534(n+2). - Bruno Berselli, Oct 26 2011
a(n) = numerator( binomial((n+2)/2,2) ). - Wesley Ivan Hurt, Oct 16 2013
E.g.f.: x*((24+x)*cosh(x) + (3+8*x)*sinh(x))/8. - G. C. Greubel, Sep 20 2018
Sum_{n>=1} 1/a(n) = 5/2. - Amiram Eldar, Aug 12 2022

A234251 Triangle T(n, k) = Number of ways to choose k points from an n X n X n triangular grid so that no three of them form a 2 X 2 X 2 subtriangle. Triangle T read by rows.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 6, 15, 16, 6, 1, 10, 45, 111, 156, 120, 42, 2, 1, 15, 105, 439, 1191, 2154, 2583, 1977, 885, 189, 9, 1, 21, 210, 1305, 5565, 17052, 38337, 63576, 77208, 67285, 40512, 15750, 3480, 333, 9, 1, 28, 378, 3240, 19620, 88590, 307362, 833228, 1779219
Offset: 1

Author

Heinrich Ludwig, Feb 06 2014

Keywords

Comments

n starts from 1. The maximal number of points that can be chosen from a grid of side n, so that no three of them are forming a subtriangle of side 2, is A007980(n - 1). So k ranges from 0 to A007980(n - 1).
Column #2 (k = 1) is A000217.
Column #3 (k = 2) is A050534.
Column #4 (k = 3) is A234250.

Examples

			Triangle begins
  1,  1;
  1,  3,   3;
  1,  6,  15,  16,    6;
  1, 10,  45, 111,  156,  120,   42,    2;
  1, 15, 105, 439, 1191, 2154, 2583, 1977, 885, 189, 9;
  ...
There are no more than T(4, 7) = 2 ways to choose 7 points (X) from a 4 X 4 X 4 grid so that no 3 of them form a 2 X 2 X 2 subtriangle:
        X              X
       X .            . X
      . X X          X X .
     X X . X        X . X X
		

Crossrefs

A243214 Number of ways to place 5 points on a triangular grid of side n, so that no three of them are vertices of an equilateral triangle with sides parallel to the grid.

Original entry on oeis.org

0, 63, 1566, 13971, 77124, 319206, 1083723, 3181401, 8344854, 20006349, 44548227, 93248628, 185176866, 351410664, 640972980, 1129067352, 1928196432, 3203016813
Offset: 3

Author

Heinrich Ludwig, Jun 10 2014

Keywords

Formula

a(n) = (n^10 + 5*n^9 - 10*n^8)/3840 + O(n^7)

A053527 Number of bipartite graphs with 4 edges on nodes {1..n}.

Original entry on oeis.org

0, 0, 0, 0, 3, 140, 1125, 5355, 19075, 56133, 143955, 332475, 706860, 1404975, 2640638, 4733820, 8149050, 13543390, 21825450, 34227018, 52388985, 78463350, 115233195, 166252625, 236008773, 330108075, 455489125, 620664525, 835994250
Offset: 0

Author

N. J. A. Sloane, Jan 16 2000

Keywords

References

  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.5.

Crossrefs

Column k=4 of A117279.
Cf. A000217 (1 edge), A050534 (2 edges), A053526 (3 edges).

Programs

  • GAP
    List([0..30], n-> Binomial(n,4)*(n+2)*(n^3-5*n-36)/16 ) # G. C. Greubel, May 15 2019
  • Magma
    [(n^5-4*n^4-n^3+16*n^2-12*n)*(n^3-5*n-36)/384: n in [0..30]]; // Vincenzo Librandi, May 08 2012
    
  • Mathematica
    CoefficientList[Series[x^4*(3+113*x-27*x^2+18*x^3-2*x^4)/(1-x)^9, {x,0, 30}], x] (* Vincenzo Librandi, May 08 2012 *)
  • PARI
    {a(n) = binomial(n,4)*(n+2)*(n^3-5*n-36)/16}; \\ G. C. Greubel, May 15 2019
    
  • Sage
    [binomial(n,4)*(n+2)*(n^3-5*n-36)/16 for n in (0..30)] # G. C. Greubel, May 15 2019
    

Formula

a(n) = (n-3)*(n-2)*(n-1)*n*(n+2)*(n^3-5*n-36)/384.
G.f.: x^4*(3+113*x-27*x^2+18*x^3-2*x^4)/(1-x)^9. - Colin Barker, May 08 2012
E.g.f.: x^4*(48 + 400*x + 176*x^2 + 24*x^3 + x^4)*exp(x)/384. - G. C. Greubel, May 15 2019

A144163 Triangle T(n,k), n>=0, 0<=k<=n, read by rows: T(n,k) = number of simple graphs on n labeled nodes with k edges where each maximally connected subgraph is either a tree or a cycle.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 3, 3, 1, 1, 6, 15, 20, 3, 1, 10, 45, 120, 150, 12, 1, 15, 105, 455, 1185, 1473, 70, 1, 21, 210, 1330, 5565, 14469, 18424, 465, 1, 28, 378, 3276, 19635, 81060, 213990, 280200, 3507, 1, 36, 630, 7140, 57393, 334656, 1385076, 3732300, 5029218, 30016
Offset: 0

Author

Alois P. Heinz, Sep 12 2008

Keywords

Examples

			T(4,3) = 20, because there are 20 simple graphs on 4 labeled nodes with 3 edges, where each maximally connected subgraph is either a tree or a cycle, 16 of these graphs consist of a single tree with 4 nodes and 4 consist of a cycle with 3 and a tree with 1 node:
  .1-2. .1-2. .1.2. .1.2. .1-2. .1-2. .1-2. .1-2. .1-2. .1.2.
  .|\.. ../|. ..\|. .|/.. .|... ...|. ../.. ..\.. .|.|. .|.|.
  .4.3. .4.3. .4-3. .4-3. .4-3. .4-3. .4-3. .4-3. .4.3. .4-3.
  .
  .1.2. .1.2. .1-2. .1.2. .1.2. .1.2. .1.2. .1.2. .1-2. .1-2.
  .|/|. .|\|. ..X.. ..X|. ..X.. .|X.. ../|. .|\.. .|/.. ..\|.
  .4.3. .4.3. .4.3. .4.3. .4-3. .4.3. .4-3. .4-3. .4.3. .4.3.
Triangle begins:
  1;
  1,  0;
  1,  1,  0;
  1,  3,  3,   1;
  1,  6, 15,  20,   3;
  1, 10, 45, 120, 150, 12;
		

Crossrefs

Columns k=0-3 give: A000012, A000217, A050534, A093566.
Main diagonal gives A001205.
Row sums give A144164.

Programs

  • Maple
    f:= proc(n,k) option remember; local j; if k=0 then 1 elif k<0 or n<=k then 0 elif k=n-1 then n^(n-2) else add(binomial(n-1,j) *f(j+1,j) *f(n-1-j,k-j), j=0..k) fi end:
    c:= proc(n,k) option remember; local i,j; if k=0 then 1 elif k<0 or n
    				
  • Mathematica
    f[n_, k_] := f[n, k] = Which[k == 0, 1, k<0 || n <= k, 0, k == n-1, n^(n-2), True, Sum[Binomial[n-1, j]*f[j+1, j]*f[n-1-j, k-j], {j, 0, k}]]; c[n_, k_] := c[n, k] = Which[k == 0, 1 , k<0 || nJean-François Alcover, Jan 21 2014, translated from Alois P. Heinz's Maple code *)

Formula

T(n,k) = A138464(n,k) + Sum_{j=3..k} C(n,j) A138464(n-j,k-j) A144161 (j,j).
Previous Showing 31-40 of 54 results. Next