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

A070084 Greatest common divisor of sides of integer triangles [A070080(n), A070081(n), A070082(n)], sorted by perimeter, sides lexicographically ordered.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 3, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 7, 2, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

a(n)>1 iff there exists a smaller similar triangle [A070080(k), A070081(k), A070082(k)] with kA070080(n)=A070080(k)*a(n), A070081(n)=A070081(k)*a(n) and A070082(n)=A070082(k)*a(n).

Crossrefs

Programs

  • Mathematica
    maxPer = 22; maxSide = Floor[(maxPer - 1)/2]; order[{a_, b_, c_}] := (a + b + c)*maxPer^3 + a*maxPer^2 + b*maxPer + c; triangles = Reap[Do[If[a + b + c <= maxPer && c - b < a < c + b && b - a < c < b + a && c - a < b < c + a, Sow[{a, b, c}]], {a, 1, maxSide}, {b, a, maxSide}, {c, b, maxSide}]][[2, 1]]; GCD @@@ Sort[triangles, order[#1] < order[#2] &] (* Jean-François Alcover, May 27 2013 *)

Formula

a(n) = GCD(A070080(n), A070081(n), A070082(n)).

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

A070101 Number of obtuse integer triangles with perimeter n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 2, 3, 2, 3, 3, 5, 3, 7, 4, 8, 5, 9, 7, 10, 8, 11, 9, 14, 11, 16, 12, 18, 14, 19, 17, 21, 18, 23, 21, 27, 22, 30, 24, 32, 27, 34, 30, 37, 33, 40, 35, 44, 37, 47, 40, 50, 44, 53, 49, 56, 52, 60, 55, 64, 57, 68
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

An integer triangle [A070080(k) <= A070081(k) <= A070082(k)] is obtuse iff A070085(k) < 0.

Examples

			For n=14 there are A005044(14)=4 integer triangles: [2,6,6], [3,5,6], [4,4,6] and [4,5,5]; two of them are obtuse, as 3^2+5^2<36=6^2 and 4^2+4^2<36=6^2, therefore a(14)=2.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - Sign[Floor[(i^2 + k^2)/(n - i - k)^2]]) Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}] (* Wesley Ivan Hurt, May 12 2019 *)

Formula

a(n) = A005044(n) - A070093(n) - A024155(n).
a(n) = A024156(n) + A070106(n).
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)}
(1-sign(floor((i^2 + k^2)/(n-i-k)^2))) * sign(floor((i+k)/(n-i-k+1))). - Wesley Ivan Hurt, May 12 2019

A070109 Number of right integer triangles with perimeter n and relatively prime side lengths.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

Right integer triangles have integer areas: see A070142, A051516.
a(n) is nonzero iff n is in A024364.

Examples

			For n=30 there are A005044(30) = 19 integer triangles; only one is right: 5+12+13 = 30, 5^2+12^2 = 13^2; therefore a(30) = 1.
		

Crossrefs

Programs

  • Mathematica
    unitaryDivisors[n_] := Cases[Divisors[n], d_ /; GCD[d, n/d] == 1];
    A078926[n_] := Count[unitaryDivisors[n], d_ /; OddQ[d] && Sqrt[n] < d < Sqrt[2n]];
    a[n_] := If[EvenQ[n], A078926[n/2], 0];
    Table[a[n], {n, 1, 1716}] (* Jean-François Alcover, Oct 04 2021 *)

Formula

a(n) = A078926(n/2) if n is even; a(n)=0 if n is odd.
a(n) = A051493(n) - A070094(n) - A070102(n).
a(n) <= A024155(n).

Extensions

Secondary offset added by Antti Karttunen, Oct 07 2017

A070094 Number of acute integer triangles with perimeter n and relatively prime side lengths.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 2, 1, 3, 1, 2, 2, 5, 2, 5, 3, 3, 4, 6, 3, 6, 4, 7, 6, 10, 4, 10, 7, 8, 7, 10, 7, 14, 8, 12, 8, 17, 10, 17, 12, 13, 14, 20, 12, 21, 14, 18, 16, 25, 15, 23, 18, 22, 20, 30, 16, 32, 21, 29, 23, 32, 21, 38, 27, 33, 26, 43, 25
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

a(n) = A051493(n) - A070102(n) - A070109(n).

Examples

			For n=10 there are A005044(10) = 2 integer triangles: [2,4,4] and [3,3,4]; both are acute, but GCD(2,4,4)>1, therefore a(9) = 1.
		

Crossrefs

A070107 Number of integer triangles with perimeter n and relatively prime side lengths which are obtuse and isosceles.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 2, 1, 0, 1, 1, 0, 1, 1, 2, 1, 2, 1, 2, 0, 1, 1, 2, 1, 1, 1, 2, 1, 2, 0, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 3, 2, 3, 1, 2, 1, 3, 1, 3, 2, 1, 1, 1, 0, 4, 2, 2, 2, 4, 1, 3, 2, 3, 2, 4, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Crossrefs

A070128 Numbers n such that [A070080(n), A070081(n), A070082(n)] is an obtuse integer triangle with relatively prime side lengths.

Original entry on oeis.org

5, 8, 13, 14, 20, 21, 25, 29, 30, 32, 36, 37, 41, 42, 44, 49, 52, 56, 57, 59, 61, 62, 66, 67, 69, 74, 75, 77, 78, 79, 80, 86, 89, 96, 97, 99, 100, 101, 102, 104, 105, 110, 111, 113, 115, 118, 122, 123, 125, 126, 127, 128, 130, 131, 133
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Examples

			a(9)=30: [A070080(30), A070081(30), A070082(30)]=[3,5,7], A070084(30)=gcd(3,5,7)=1, A070085(30)=3^2+5^2-7^2=9+25-49=-15>0.
		

Crossrefs

A070104 Number of integer triangles with perimeter n and relatively prime side lengths which are obtuse and scalene.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 1, 2, 2, 3, 1, 4, 3, 6, 2, 7, 4, 8, 4, 8, 6, 10, 6, 12, 8, 14, 8, 16, 11, 18, 11, 17, 14, 21, 12, 25, 18, 25, 15, 30, 19, 32, 20, 32, 25, 38, 23, 40, 28, 41, 28, 47, 31, 51, 34, 46, 40, 55, 35, 61, 44, 58, 41, 68
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local a,b,q,bmin,bmax,t;
      t:= 0;
      for a from 1 to n/3 do
        if n::even then bmin:= max(a+1,n/2-a+1) else bmin:= max(a+1,(n+1)/2-a) fi;
        q:= (n^2-2*n*a)/(2*(n-a));
        if q::integer then bmax:= min((n-a)/2, q-1) else bmax:= min((n-a)/2, floor(q)) fi;
        t:= t + nops(select(b -> igcd(a,b,n-a-b) = 1, [$bmin .. bmax]))
      od;
      t
    end proc:
    map(f, [$1..100]); # Robert Israel, Jul 26 2024
Showing 1-8 of 8 results.