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-2 of 2 results.

A124287 Triangle of the number of integer-sided k-gons having perimeter n, for k=3..n.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 3, 1, 1, 1, 5, 4, 4, 1, 1, 3, 7, 9, 7, 4, 1, 1, 2, 9, 13, 15, 8, 5, 1, 1, 4, 13, 23, 25, 20, 10, 5, 1, 1, 3, 16, 29, 46, 37, 29, 12, 6, 1, 1, 5, 22, 48, 72, 75, 57, 35, 14, 6, 1, 1, 4, 25, 60, 113, 129, 125, 79, 47, 16, 7, 1, 1, 7, 34, 92, 172, 228, 231, 185
Offset: 3

Views

Author

T. D. Noe, Oct 24 2006

Keywords

Comments

Rotations and reversals are counted only once. For a k-gon to be nondegenerate, the longest side must be shorter than the sum of the remaining sides. Column k=3 is A005044, column k=4 is A057886, column k=5 is A124285 and column k=6 is A124286. Note that A124278 counts polygons whose sides are nondecreasing.

Examples

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

Crossrefs

Row sums are A293818.
Cf. A293819.

Programs

  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; Table[p=Partitions[n]; Table[s=Select[p,Length[ # ]==k && #[[1]]Jean-François Alcover, Jun 14 2018, after Andrew Howroyd *)
  • PARI
    T(n,k)={(sumdiv(gcd(n, k), d, eulerphi(d)*binomial(n/d, k/d))/n + binomial(k\2 + (n-k)\2, k\2) - binomial(n\2, k-1) - binomial(n\4, k\2) - if(k%2, 0, binomial((n+2)\4, k\2)))/2;}
    for(n=3, 10, for(k=3, n, print1(T(n, k), ", ")); print); \\ Andrew Howroyd, Nov 21 2017

Formula

A formula is given in Theorem 1.5 of the East and Niles article.

A293820 Number of integer-sided polygons having perimeter n, modulo rotations but not reflections.

Original entry on oeis.org

1, 1, 3, 5, 11, 19, 43, 75, 155, 287, 567, 1053, 2063, 3859, 7455, 14089, 27083, 51463, 98855, 188697, 362675, 695155, 1338087, 2573235, 4962875, 9571195, 18496407, 35759799, 69240899, 134154259, 260235639, 505163055, 981575759, 1908619755, 3714304167, 7233118641, 14095779055
Offset: 3

Views

Author

James East, Oct 16 2017

Keywords

Comments

Rotations are counted only once, but reflections are considered different. For a polygon to be nondegenerate, the longest side must be shorter than the sum of the remaining sides (equivalently, shorter than n/2). These are row sums of A293819.
A formula is given in Section 6 of the East and Niles article.
The same article shows that a(n) is asymptotic to 2^n / n.

Examples

			There are 11 polygons having perimeter 7: 2 triangles (331, 322), 4 quadrilaterals (3211, 3121, 3112, 2221), 3 pentagons (31111, 22111, 21211), 1 hexagon (211111) and 1 heptagon (1111111).
		

Crossrefs

Cf. A008742 (triangles), A293818 (reflections allowed), A293821 (quadrilaterals), A293822 (pentagons), A293823 (hexagons).
Row sums of A293819 (k-gon triangle).

Programs

  • Mathematica
    T[n_, k_] := DivisorSum[GCD[n, k], EulerPhi[#]*Binomial[n/#, k/#] &]/n - Binomial[Floor[n/2], k - 1];
    a[n_] := Sum[T[n, k], {k, 3, n}]
    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)/n - 1 - 2^floor(n/2); \\ Andrew Howroyd, Nov 21 2017

Formula

a(n) = (Sum_{d|n} phi(n/d)*2^d)/n - 1 - 2^floor(n/2). - Andrew Howroyd, Nov 21 2017
Showing 1-2 of 2 results.