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.

A051493 Triangles with perimeter n and relatively prime integer side lengths.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 2, 1, 2, 1, 4, 2, 5, 2, 5, 4, 8, 4, 10, 6, 9, 6, 14, 8, 15, 9, 16, 12, 21, 11, 24, 16, 22, 16, 27, 18, 33, 20, 31, 24, 40, 23, 44, 30, 39, 30, 52, 32, 54, 35, 52, 42, 65, 38, 65, 48, 64, 49, 80, 48, 85, 56, 77, 64, 90, 58, 102, 72, 93, 69, 114, 72, 120, 81
Offset: 1

Views

Author

Keywords

Comments

From Peter Munn, Jul 26 2017: (Start)
The triangles that meet the conditions are listed by nondecreasing n in A070110.
Without the requirement for relatively prime side lengths, this sequence becomes A005044.
Counting the triangles by longest side instead of perimeter, this sequence becomes A123323.
a(n) = A070094(n) + A070102(n) + A070109(n).
(End)

Examples

			There are 3 triangles with integer-length sides and perimeter 9: 1-4-4, 2-3-4, 3-3-3. 3-3-3 is omitted because isomorphic to 1-1-1, so a(9)=2.
		

Crossrefs

Equivalent sequences, restricted to subsets: A070091 (isosceles), A070094 (acute), A070102 (obtuse), A070109 (right-angled), A070138 (with integer area), A070202 (with integer inradius).

Programs

  • Mathematica
    nmax = 100;
    A005044[n_] := Quotient[n^2 + 6n Mod[n, 2] + 24, 48];
    A = Array[A005044, nmax];
    mob[m_, n_] := If[ Mod[m, n] == 0, MoebiusMu[m/n], 0];
    Reap[Do[Sow[Sum[mob[n, d] A[[d]], {d, 1, n}]], {n, 1, nmax}]][[2, 1]] (* Jean-François Alcover, Oct 05 2021 *)

Formula

Moebius transform of A005044.

Extensions

Corrected and extended with formula by Christian G. Bower, Nov 15 1999
Formula updated due to change to referenced sequence, and definition clarified by Peter Munn, Jul 26 2017

A057886 Number of integer 4-tuples that give the lengths of the sides of a nondegenerate quadrilateral with perimeter n.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 5, 7, 9, 13, 16, 22, 25, 34, 38, 50, 54, 70, 75, 95, 100, 125, 131, 161, 167, 203, 210, 252, 259, 308, 316, 372, 380, 444, 453, 525, 534, 615, 625, 715, 725, 825, 836, 946, 957, 1078, 1090, 1222, 1234, 1378, 1391, 1547, 1560, 1729, 1743
Offset: 1

Views

Author

John W. Layman, Sep 19 2000

Keywords

Examples

			There are five quadrilaterals with perimeter 8, with sides (1,1,3,3), (1,2,2,3), (1,2,3,2), (1,3,1,3) and (2,2,2,2), so a(8)=5.
		

Crossrefs

The Moebius transform is A057887. Cf. A005044.
Cf. A062890.

Programs

  • Maple
    A057886 := proc(n) local s1, s2, s3, s4, a; a := 0; if 4 <= n then for s1 to floor(1/4*n) do for s2 from s1 to floor(1/3*n - 1/3*s1) do for s3 from max(s2, floor(1/2*n - s1 - s2) + 1) to floor(1/2*n - 1/2*s1 - 1/2*s2) do s4 := n - s1 - s2 - s3; if s1 < s2 and s2 < s3 and s3 < s4 then a := a + 3; elif s2 = s3 and (s1 = s2 or s3 = s4) then a := a + 1; else a := a + 2; end if; end do; end do; end do; end if; return a; end proc; seq(A057886(n), n = 1 .. 56); # Felix Huber, Mar 13 2024
  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; Table[s=Select[Partitions[n], Length[ # ]==4 && #[[1]]T. D. Noe, Oct 24 2006 *)

Formula

Conjecture: a(1)=0 and, for n>1, a(n)=a(n-1)+d(n-1), where d(n)=floor(n/4)*floor((n-2)/4) if n is even and d(n)=floor((n+1)/4) if n is odd.
Conjectures from Colin Barker, Oct 27 2013: (Start)
a(n) = ((n-1)*((n-2)*n+18)+6*sin((Pi*n)/2)+18*cos((Pi*n)/2))/96 for n even;
a(n) = (n^3-7*n+6*sin((Pi*n)/2)+18*cos((Pi*n)/2))/96 for n odd.
G.f.: x^4*(x^3-x^2+1) / ((x-1)^4*(x+1)^3*(x^2+1)). (End)
Conjecture: a(n) = ( 2*n^3-3*n^2+13*n-18 - 3*(n^2-9*n+6)*(-1)^n + 12*(2+(-1)^n)*(-1)^((2*n+(-1)^n-1)/4) )/192. - Luce ETIENNE, Nov 06 2014

Extensions

Corrected by T. D. Noe, Oct 24 2006
Showing 1-2 of 2 results.