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-10 of 16 results. Next

A316841 Three-column table read by rows giving integer sides of proper triangles (i,j,k) with i >= j >= k >= 1, j+k > i.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jul 23 2018, following a suggestion from Donald S. McDonald

Keywords

Examples

			Table begins (imprimitive triples are labeled i):
[1,1,1],
[2,2,1],
[2,2,2],i
[3,2,2],
[3,3,1],
[3,3,2],
[3,3,3],i
[4,3,2],
[4,3,3],
[4,4,1],
[4,4,2],i
[4,4,3],
[4,4,4],i
[5,3,3],
...
		

Crossrefs

There are A002620(k+1) rows that begin with k.
The three columns are A316843, A316844, A316845.
A316849 is a compressed version.
See A316842 for primitive triples.
See A316851 and A316853 & A317182 for perimeter and area.
Other related sequences: A051493, A070080, A070081, A070082, A070110.

Programs

  • PARI
    for(i=1,6, for(j=1,i, for(k=1,j, if(j+k>i, print1(i,", ",j,", ",k,", "))))) \\ Hugo Pfoertner, Jan 25 2020

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)).

A070138 Number of integer triangles with an integer area having relatively prime sides a, b and c such that a + b + c = n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 5, 0, 0, 0, 0, 0, 3
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

From Peter Kagey, Jan 30 2018: (Start)
a(k) > 0 if and only if k is in A096468.
Records appear at indices 12, 36, 54, 84, 98, 162, 242, 338, 484, 578, ....
a(2k - 1) = 0 for all integers k > 0.
(End)

Crossrefs

Extensions

Corrected by T. D. Noe, Jun 17 2004

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

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 27, 28, 29, 30, 32, 33, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 70, 72, 73, 74, 75, 77
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

A070084(a(k)) = gcd(A070080(a(k)), A070081(a(k)), A070082(a(k))) = 1;
all integer triangles [A070080(a(k)), A070081(a(k)), A070082(a(k))] are mutually nonisomorphic.

Examples

			13 is a term: [A070080(13), A070081(13), A070082(13)]=[2,4,5], A070084(13)=gcd(2,4,5)=1.
		

Crossrefs

Programs

  • Mathematica
    m = 50 (* max perimeter *);
    sides[per_] := Select[Reverse /@ IntegerPartitions[per, {3}, Range[ Ceiling[per/2]]], #[[1]] < per/2 && #[[2]] < per/2 && #[[3]] < per/2 &];
    triangles = DeleteCases[Table[sides[per], {per, 3, m}], {}] // Flatten[#, 1] & // SortBy[Total[#] m^3 + #[[1]] m^2 + #[[2]] m + #[[1]] &];
    Position[triangles, {a_, b_, c_} /; GCD[a, b, c] == 1] // Flatten (* Jean-François Alcover, Oct 04 2021 *)

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

A316842 Three-column table read by rows giving primitive integer sides of proper triangles (i,j,k) with i >= j >= k >= 1, j+k > i, gcd(i,j,k) = 1.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jul 23 2018, following a suggestion from Donald S. McDonald

Keywords

Examples

			Table begins:
[1,1,1],
[2,2,1],
[3,2,2],
[3,3,1],
[3,3,2],
[4,3,2],
[4,3,3],
[4,4,1],
[4,4,3],
[5,3,3],
[5,4,2],
...
		

Crossrefs

There are A123323(k) rows that begin with k.
The three columns are A316846, A316847, A316848.
A316850 is a compressed version.
See A316841 for all triples (including imprimitive triples).
See A316852 and A317181 & A317183 for perimeter and area.
Other related sequences: A051493, A070080, A070081, A070082, A070110.

A123323 Number of integer-sided triangles with maximum side n, with sides relatively prime.

Original entry on oeis.org

1, 1, 3, 4, 8, 7, 15, 14, 21, 20, 35, 26, 48, 39, 52, 52, 80, 57, 99, 76, 102, 95, 143, 100, 160, 132, 171, 150, 224, 148, 255, 200, 250, 224, 300, 222, 360, 279, 348, 296, 440, 294, 483, 370, 444, 407, 575, 392, 609, 460, 592, 516, 728, 495, 740, 588, 738, 644
Offset: 1

Views

Author

Keywords

Comments

Number of triples a,b,c with a <= b <= c < a+b, gcd(a,b,c) = 1 and c = n.
Dropping the requirement for side lengths to be relatively prime this sequence becomes A002620 (with a different offset). See the Sep 2006 comment in A002620. - Peter Munn, Jul 26 2017

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= n-> add(mobius(n/d)*floor((d+1)^2/4), d=divisors(n)):
    seq(a(n), n=1..60);  # Alois P. Heinz, Oct 23 2013
  • Mathematica
    a[n_] := DivisorSum[n, Floor[(#+1)^2/4]*MoebiusMu[n/#]&]; Array[a, 60] (* Jean-François Alcover, Dec 07 2015 *)
  • PARI
    A123323(n)=sumdiv(n,d,floor((d+1)^2/4)*moebius(n/d))

Formula

Moebius transform of b(n) = floor((n+1)^2/4).
G.f.: (G(x)+x-x^2)/2, where G(x) = Sum_{k >= 1} mobius(k)*x^k*(1+2*x^k-x^(2*k))/(1-x^k)^2/(1-x^(2*k)).

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

A070102 Number of obtuse integer triangles with perimeter n and relatively prime side lengths.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 1, 3, 2, 3, 2, 5, 3, 6, 2, 8, 5, 9, 5, 9, 6, 11, 6, 14, 9, 14, 9, 17, 11, 19, 12, 19, 15, 23, 13, 27, 18, 26, 16, 32, 20, 33, 21, 34, 26, 40, 23, 42, 29, 42, 29, 50, 32, 53, 35, 48, 41, 58, 37, 64, 45, 60, 42, 71
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

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

Examples

			For n=9 there are A005044(9)=3 integer triangles: [1,4,4], [2,3,4] and [3,3,3]; only one of them is obtuse: 2^2+3^2<16=4^2 and GCD(2,3,4)=1, therefore a(9)=1.
		

Crossrefs

A070091 Number of isosceles integer triangles with perimeter n and relatively prime side lengths.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 2, 1, 1, 1, 3, 1, 3, 1, 2, 2, 4, 2, 5, 2, 2, 2, 6, 2, 5, 3, 5, 3, 7, 2, 8, 4, 4, 4, 6, 3, 9, 4, 6, 4, 10, 4, 11, 5, 6, 5, 12, 4, 10, 5, 8, 6, 13, 4, 10, 6, 8, 7, 15, 4, 15, 7, 10, 8, 12, 6, 17, 8, 10, 6, 18, 6, 18, 9, 10, 9, 14, 6, 20, 8, 13
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

a(n) = A051493(n) - A005044(n-6).

Examples

			For n=15 there are A005044(15)=7 integer triangles: [1,7,7], [2,6,7], [3,5,7], [3,6,6], [4,4,7], [4,5,6] and [5,5,5]: four are isosceles: [1<7=7], [3<6=6], [4=4<7] and [5=5=5], but GCD(3,6,6)>1 and GCD(5,5,5)>1, therefore a(15)=2.
		

Crossrefs

Programs

  • Mathematica
    m = 81 (* max perimeter *);
    sides[per_] := Select[Reverse /@ IntegerPartitions[per, {3}, Range[ Ceiling[per/2]]], #[[1]] < per/2 && #[[2]] < per/2 && #[[3]] < per/2 &];
    triangles = DeleteCases[Table[sides[per], {per, 3, m}], {}] // Flatten[#, 1] & // SortBy[Total[#] m^3 + #[[1]] m^2 + #[[2]] m + #[[1]] &] ;
    a[n_] := Count[triangles, t_ /; Total[t] == n && Length[Union[t]] < 3 && GCD @@ t == 1];
    Table[a[n], {n, 1, m}] (* Jean-François Alcover, Oct 05 2021 *)
Showing 1-10 of 16 results. Next