login
This site is supported by donations to The OEIS Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A046081 Number of integer-sided right triangles with n as a hypotenuse or leg. 19
0, 0, 1, 1, 2, 1, 1, 2, 2, 2, 1, 4, 2, 1, 5, 3, 2, 2, 1, 5, 4, 1, 1, 7, 4, 2, 3, 4, 2, 5, 1, 4, 4, 2, 5, 7, 2, 1, 5, 8, 2, 4, 1, 4, 8, 1, 1, 10, 2, 4, 5, 5, 2, 3, 5, 7, 4, 2, 1, 14, 2, 1, 7, 5, 8, 4, 1, 5, 4, 5, 1, 12, 2, 2, 9, 4, 4, 5, 1, 11, 4, 2, 1, 13, 8, 1, 5, 7, 2, 8, 5, 4, 4, 1, 5, 13, 2, 2, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

REFERENCES

A. Beiler, Recreations in the Theory of Numbers. New York: Dover, pp. 116-117, 1966.

LINKS

Lars Blomberg, Table of n, a(n) for n = 1..10000

Anonymous, Generator of all Pythagorean triples that include a given number [Internet Archive Wayback Machine]

Ron Knott, Pythagorean Triples and Online Calculators

F. Richman, Pythagorean Triples

A. Tripathi, On Pythagorean triples containing a fixed integer, Fib. Q., 46/47 (2008/2009), 331-340. See Theorem 8.

Eric Weisstein's World of Mathematics, Pythagorean Triple

FORMULA

a(n) = A046079(n) + A046080(n). - Lekraj Beedassy, Dec 01 2003

MATHEMATICA

a[1] = 0; a[n_] := Module[{f}, f = Select[FactorInteger[n], Mod[#[[1]], 4] == 1&][[All, 2]]; (DivisorSigma[0, If[OddQ[n], n, n/2]^2]-1)/2 + (Times @@ (2*f+1) - 1)/2]; Array[a, 99] (* Jean-Fran├žois Alcover, Jul 19 2017 *)

PROG

(PARI) a(n) = {oddn = n/(2^valuation(n, 2)); f = factor(oddn); for (k=1, #f~, if ((f[k, 1] % 4) != 1, f[k, 2] = 0); ); n1 = factorback(f); if (n % 2, (numdiv(n^2)+numdiv(n1^2))/2 -1, (numdiv((n/2)^2)+numdiv(n1^2))/2 -1); } \\ Michel Marcus, Mar 07 2016

CROSSREFS

Cf. A006593, A046079, A046080.

Sequence in context: A225332 A209032 A183935 * A190592 A062501 A182599

Adjacent sequences:  A046078 A046079 A046080 * A046082 A046083 A046084

KEYWORD

nonn

AUTHOR

Eric W. Weisstein

EXTENSIONS

Improved name by Bernard Schott, Jan 03 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 19 09:35 EST 2019. Contains 319306 sequences. (Running on oeis4.)