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.

Showing 1-6 of 6 results.

A124278 Triangle of the number of nondegenerate k-gons having perimeter n and whose sides are nondecreasing, for k=3..n.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 3, 2, 2, 1, 1, 3, 4, 4, 3, 2, 1, 1, 2, 5, 5, 4, 3, 2, 1, 1, 4, 7, 8, 6, 5, 3, 2, 1, 1, 3, 8, 9, 9, 6, 5, 3, 2, 1, 1, 5, 11, 14, 12, 10, 7, 5, 3, 2, 1, 1, 4, 12, 16, 16, 13, 10, 7, 5, 3, 2, 1, 1, 7, 16, 23, 22, 19, 14, 11, 7, 5, 3, 2, 1, 1, 5, 18, 25, 28, 24, 20, 14, 11, 7, 5, 3, 2, 1, 1
Offset: 3

Views

Author

T. D. Noe, Oct 24 2006

Keywords

Comments

For a k-gon to be nondegenerate, the longest side must be shorter than the sum of the remaining sides.
T(n,k) = number of partitions of n into k parts (k >= 3) in which all parts are less than n/2. Also T(n,k) = number of partitions of 2*n into k parts in which all parts are even and less than n. - L. Edson Jeffery, Mar 19 2012

Examples

			For polygons having perimeter 7: 2 triangles, 2 quadrilaterals, 2 pentagons, 1 hexagon and 1 heptagon. The triangle begins
1
0 1
1 1 1
1 1 1 1
2 2 2 1 1
1 3 2 2 1 1
		

Crossrefs

Cf. A124287 (similar, but with no restriction on the sides).
Cf. A210249 (gives row sums of this sequence for n >= 3).
Cf. A005044 (k=3), A062890 (k=4), A069906 (k=5), A069907 (k=6), A288253 (k=7), A288254 (k=8), A288255 (k=9), A288256 (k=10).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1], `if`(i<1, [],
          zip((x, y)-> x+y, b(n, i-1), `if`(i>n, [],
                        [0, b(n-i, i)[]]), 0)))
        end:
    T:= n-> b(n, ceil(n/2)-1)[4..n+1][]:
    seq(T(n), n=3..20);  # Alois P. Heinz, Jul 15 2013
  • Mathematica
    Flatten[Table[p=IntegerPartitions[n]; Length[Select[p, Length[ # ]==k && #[[1]] < Total[Rest[ # ]]&]], {n,3,30}, {k,3,n}]]
    (* second program: *)
    QP = QPochhammer; T[n_, k_] := SeriesCoefficient[x^k*(1/QP[x, x, k] + x^(k - 2)/((x-1)*QP[x^2, x^2, k-1])), {x, 0, n}]; Table[T[n, k], {n, 3, 16}, {k, 3, n}] // Flatten (* Jean-François Alcover, Jan 08 2016 *)

Formula

G.f. for column k is x^k/(product_{i=1..k} 1-x^i) - x^(2k-2)/(1-x)/(product_{i=1..k-1} 1-x^(2i)).

A293819 Triangle read by rows of the number of integer-sided k-gons having perimeter n, modulo rotations but not reflections, for k=3..n.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 2, 4, 3, 1, 1, 1, 6, 6, 4, 1, 1, 4, 10, 13, 10, 4, 1, 1, 2, 12, 21, 21, 12, 5, 1, 1, 5, 20, 37, 41, 30, 15, 5, 1, 1, 4, 23, 51, 74, 65, 43, 19, 6, 1, 1, 7, 35, 84, 126, 131, 99, 55, 22, 6, 1, 1, 5, 38, 108, 196, 239, 216, 143, 73, 26, 7, 1, 1, 10, 56, 166, 314, 422, 428
Offset: 3

Views

Author

James East, Oct 16 2017

Keywords

Comments

Rotations are counted only once, but reflections are considered different. For a k-gon to be nondegenerate, the longest side must be shorter than the sum of the remaining sides (equivalently, shorter than n/2). Column k=3 is A008742, column k=4 is A293821, column k=5 is A293822 and column k=6 is A293823.
A formula is given in Section 6 of the East and Niles article.

Examples

			For polygons having perimeter 7, there are: 2 triangles (331, 322), 4 quadrilaterals (3211, 3121, 3112, 2221), 3 pentagons (31111, 22111, 21211), 1 hexagon (211111) and 1 heptagon (1111111). Note that the quadrilaterals 3211 and 3112 are reflections of each other, but these are not rotationally equivalent.
The triangle begins:
n=3:  1;
n=4:  0,  1;
n=5:  1,  1,  1;
n=6:  1,  2,  1,  1;
n=7:  2,  4,  3,  1,  1;
n=8:  1,  6,  6,  4,  1,  1;
n=9:  4, 10, 13, 10,  4,  1,  1;
...
		

Crossrefs

Columns: A008742 (triangles), A293821 (quadrilaterals), A293822 (pentagons), A293823 (hexagons).
Row sums are A293820.
Same triangle with reflection allowed is A124287.

Programs

  • Mathematica
    T[n_, k_] := DivisorSum[GCD[n, k], EulerPhi[#]*Binomial[n/#, k/#]&]/n - Binomial[Floor[n/2], k - 1];
    Table[T[n, k], {n, 3, 16}, {k, 3, n}] // Flatten (* Jean-François Alcover, Jun 14 2018, translated from PARI *)
  • PARI
    T(n,k)={sumdiv(gcd(n,k), d, eulerphi(d)*binomial(n/d,k/d))/n - binomial(floor(n/2), k-1)}
    for(n=3, 10, for(k=3, n, print1(T(n, k), ", ")); print); \\ Andrew Howroyd, Nov 21 2017

Formula

T(n,k) = (Sum_{d|gcd(n,k)} phi(d)*binomial(n/d, k/d))/n - binomial(floor(n/2), k-1). - Andrew Howroyd, Nov 21 2017

A293818 Number of integer-sided polygons having perimeter n, modulo rotations and reflections.

Original entry on oeis.org

1, 1, 3, 5, 10, 16, 32, 54, 102, 180, 336, 607, 1144, 2098, 3960, 7397, 14022, 26452, 50404, 95821, 183322, 350554, 673044, 1292634, 2489502, 4797694, 9264396, 17904220, 34652962, 67125898, 130182972, 252679320, 490918440, 954505718, 1857413460, 3616951513, 7048412792, 13744169104
Offset: 3

Views

Author

James East, Oct 16 2017

Keywords

Comments

Rotations and reversals are counted only once. For a polygon to be nondegenerate, the longest side must be shorter than the sum of the remaining sides. These are row sums of A124287.
A formula is proved in Theorem 1.6 of the East and Niles article.
The same article shows that a(n) is asymptotic to 2^(n-1) / n.

Examples

			There are 10 polygons having perimeter 7: 2 triangles, 3 quadrilaterals, 3 pentagons, 1 hexagon and 1 heptagon.
		

Crossrefs

Row sums of A124287 (k-gon triangle).
Cf. A293820 (polygons modulo rotations only).

Programs

  • Mathematica
    a[n_] := DivisorSum[n, EulerPhi[n/#]*2^# &]/(2*n) + 2^Floor[(n - 3)/2] - If[Mod[n, 4] < 2, 3*2^Floor[(n - 4)/4], 2^Floor[(n + 2)/4] ];
    Table[a[n], {n, 3, 40}] (* Jean-François Alcover, Jun 14 2018, after Andrew Howroyd *)
  • PARI
    a(n)={sumdiv(n, d, eulerphi(n/d)*2^d)/(2*n) + 2^floor((n-3)/2) - if(n%4<2, 3*2^floor((n-4)/4), 2^floor((n+2)/4))} \\ Andrew Howroyd, Nov 21 2017

A124285 Number of integer-sided pentagons having perimeter n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 3, 4, 9, 13, 23, 29, 48, 60, 92, 109, 158, 186, 258, 296, 397, 451, 589, 658, 841, 933, 1169, 1283, 1582, 1728, 2100, 2275, 2732, 2948, 3502, 3756, 4419, 4725, 5511, 5866, 6789, 7207, 8283, 8761, 10006, 10560, 11990, 12617, 14250, 14968
Offset: 1

Views

Author

T. D. Noe, Oct 24 2006

Keywords

Comments

Rotations and reversals are counted only once. Note that this is different from A069906, which counts pentagons whose sides are nondecreasing.

Examples

			The three pentagons having perimeter 7 are (1,1,1,2,2), (1,1,2,1,2) and (1,1,1,1,3).
		

Crossrefs

Cf. A057886 (quadrilaterals), A124286 (hexagons), A124287 (k-gons).

Programs

  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; Table[s=Select[Partitions[n], Length[ # ]==5 && #[[1]]
    				

Formula

Empirical g.f.: -x^5*(x^12 +2*x^9 +2*x^8 +2*x^7 +5*x^6 +3*x^5 +2*x^4 +2*x^3 +x^2 +x +1) / ((x -1)^5*(x +1)^4*(x^2 +1)^2*(x^4 +x^3 +x^2 +x +1)). - Colin Barker, Oct 27 2013

A124286 Number of integer-sided hexagons having perimeter n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 4, 7, 15, 25, 46, 72, 113, 172, 248, 360, 491, 686, 896, 1217, 1536, 2031, 2504, 3236, 3905, 4955, 5880, 7336, 8586, 10556, 12208, 14823, 16964, 20364, 23106, 27456, 30906, 36399, 40692, 47532, 52816, 61237, 67672, 77941, 85701
Offset: 1

Views

Author

T. D. Noe, Oct 24 2006

Keywords

Comments

Rotations and reversals are counted only once. Note that this is different from A069907, which counts hexagons whose sides are nondecreasing.

Examples

			The four hexagons having perimeter 8 are (1,1,1,1,2,2), (1,1,1,2,1,2), (1,1,2,1,1,2) and (1,1,1,1,1,3).
		

Crossrefs

Cf. A057886 (quadrilaterals), A124285 (pentagons), A124287 (k-gons).

Programs

  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; Table[s=Select[Partitions[n], Length[ # ]==6 && #[[1]]
    				

Formula

Empirical g.f.: x^6*(x^13 +3*x^12 +6*x^11 +6*x^10 +10*x^9 +9*x^8 +12*x^7 +10*x^6 +8*x^5 +5*x^4 +4*x^3 +2*x^2 +x +1) / ((x -1)^6*(x +1)^5*(x^2 -x +1)*(x^2 +1)^2*(x^2 +x +1)^2). - Colin Barker, Oct 27 2013

A342307 Table read by ascending antidiagonals: T(n, k) is the maximum number of quasi k-gons that are not k-gons in a finite projective plane of order n, with k >= 3.

Original entry on oeis.org

126, 936, 2520, 3780, 41184, 25200, 11160, 287280, 1029600, 151200, 27090, 1294560, 12927600, 18532800, 529200, 57456, 4442760, 90619200, 439538400, 259459200, 846720, 110376, 12640320, 444276000, 4893436800, 12307075200, 2905943040, 0, 196560, 31346784, 1706443200, 34653528000, 222651374400, 295369804800, 26153487360, 0
Offset: 2

Views

Author

Stefano Spezia, Mar 08 2021

Keywords

Examples

			n\k |     3        4         5           6
----+-------------------------------------
  2 |   126     2520     25200      151200 ...
  3 |   936    41184   1029600    18532800 ...
  4 |  3780   287280  12927600   439538400 ...
  5 | 11160  1294560  90619200  4893436800 ...
...
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=k!Binomial[k-1,2]Binomial[n^2+n+1,k-1](n-1); Table[T[n-k+3,k],{n,2,9},{k,3,n+1}]//Flatten

Formula

T(n, k) = k!*binomial(k - 1, 2)*binomial(n^2 + n + 1, k - 1)*(n - 1).
Showing 1-6 of 6 results.