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.

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