[go: up one dir, main page]

login
Search: a083025 -id:a083025
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = (-1)^A083025(n).
+20
5
1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1
OFFSET
1
COMMENTS
Also numerators of an infinite series which is equal to pi, if the denominators are the natural numbers A000027, for example: pi = 1/1 + 1/2 + 1/3 + 1/4 - 1/5 + 1/6 + 1/7 + 1/8 + 1/9 - 1/10 + 1/11 + 1/12 - 1/13 + 1/14 ... = 3.14159263... This remarkable result is due to Leonhard Euler. For another version see A209662.
REFERENCES
Leonhard Euler, Introductio in analysin infinitorum, 1748.
LINKS
FORMULA
a(n) = A209662(n)/n.
Completely multiplicative with a(p) = -1 for p mod 4 = 1, a(p) = 1 otherwise. - Andrew Howroyd, Aug 04 2018
EXAMPLE
For n = 10 we have that the 10th row of triangle A207338 is [2, -5] therefore a(10) = 2*(-5)/10 = -1.
MATHEMATICA
f[p_, e_] := If[Mod[p, 4] == 1, (-1)^e, 1]; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 06 2023 *)
PROG
(PARI) a(n)={my(f=factor(n)); prod(i=1, #f~, my([p, e]=f[i, ]); if(p%4==1, -1, 1)^e)} \\ Andrew Howroyd, Aug 04 2018
CROSSREFS
Row products of triangle A207338 divided by n. Absolute values give A000012.
KEYWORD
sign,frac,easy,mult
AUTHOR
Omar E. Pol, Mar 15 2012
EXTENSIONS
Formula in sequence name from M. F. Hasler, Apr 16 2012
a(34) corrected by Ray Chandler, Mar 19 2016
STATUS
approved
a(n) = (-1)^A083025(n)*n.
+20
5
1, 2, 3, 4, -5, 6, 7, 8, 9, -10, 11, 12, -13, 14, -15, 16, -17, 18, 19, -20, 21, 22, 23, 24, 25, -26, 27, 28, -29, -30, 31, 32, 33, -34, -35, 36, -37, 38, -39, -40, -41, 42, 43, 44, -45, 46, 47, 48, 49, 50, -51, -52, -53, 54, -55, 56, 57, -58, 59, -60, -61, 62, 63, 64, 65
OFFSET
1,2
COMMENTS
Also denominators of an infinite series which is equal to pi, if the numerators are 1, 1, 1,..., for example: pi = 1/1 + 1/2 + 1/3 + 1/4 + 1/(-5) + 1/6 + 1/7 + 1/8 + 1/9 + 1/(-10) + 1/11 + 1/12 + 1/(-13) + 1/14 ... = 3.14159263... This arises from an infinite series due to Leonhard Euler which is given by: Pi = 1/1 + 1/2 + 1/3 + 1/4 - 1/5 + 1/6 + 1/7 + 1/8 + 1/9 - 1/10 + 1/11 + 1/12 - 1/13 + 1/14 ... = 3.14159263... For another version see A209661.
a(n) = -n if n has an odd number of prime factors of the form 4k+1 (counted with multiplicity), else a(n) = n. - M. F. Hasler, Apr 15 2012
Completely multiplicative because A209661 is. - Andrew Howroyd, Aug 04 2018
REFERENCES
Leonhard Euler, Introductio in analysin infinitorum, 1748.
LINKS
FORMULA
a(n) = n*A209661(n).
EXAMPLE
For n = 10 we have that the 10th row of triangle A207338 is [2, -5] therefore a(10) = 2*(-5) = -10.
MATHEMATICA
f[p_, e_] := If[Mod[p, 4] == 1, (-1)^e, 1]; a[n_] := n * Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 06 2023 *)
PROG
(PARI) a(n)={my(f=factor(n)); n*prod(i=1, #f~, my([p, e]=f[i, ]); if(p%4==1, -1, 1)^e)} \\ Andrew Howroyd, Aug 04 2018
CROSSREFS
Row products of triangle A207338. Numerators are in A000012. Absolute values give A000027.
KEYWORD
sign,frac,easy,mult
AUTHOR
Omar E. Pol, Mar 15 2012
EXTENSIONS
Formula in sequence name from M. F. Hasler, Apr 16 2012
a(34) corrected by Ray Chandler, Mar 19 2016
STATUS
approved
Lexicographically earliest infinite sequence such that for all i, j >= 1, a(i) = a(j) => f(i) = f(j), where f(n<=3) = n, f(p) = 0 for primes p > 3, and for composite n, f(n) = [A007814(n), A065339(n), A083025(n), A373591(n), A373592(n)].
+20
2
1, 2, 3, 4, 5, 6, 5, 7, 8, 9, 5, 10, 5, 11, 12, 13, 5, 14, 5, 15, 16, 17, 5, 18, 19, 20, 21, 22, 5, 23, 5, 24, 25, 9, 26, 27, 5, 11, 28, 29, 5, 30, 5, 31, 32, 17, 5, 33, 34, 35, 12, 36, 5, 37, 38, 39, 16, 9, 5, 40, 5, 11, 41, 42, 43, 44, 5, 15, 25, 45, 5, 46, 5, 20, 47, 22, 48, 49, 5, 50, 51, 9, 5, 52, 19, 11, 12, 53, 5, 54, 55, 31, 16, 17, 26, 56, 5, 57, 58
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of the function f given in the definition.
Note that for composite n, f(n) can be defined in general as a quintuple vector [v(n), w(n), x(n), y(n), z(n)], where v, w, x, y and z are any five of these six sequences: A007814, A007949, A065339, A083025, A373591, A373592. This follows because A007814(n) + A065339(n) + A083025(n) = A007949(n) + A373591(n) + A373592(n) = A001222(n), so the omitted sixth element can be always worked out from the remaining five.
For all i, j > 1:
A305900(i) = A305900(j) => a(i) = a(j) => A373595(i) = A373595(j).
LINKS
PROG
(PARI)
up_to = 100000;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
A007814(n) = valuation(n, 2);
A065339(n) = sum(i=1, #n=factor(n)~, (3==n[1, i]%4)*n[2, i]);
A083025(n) = sum(i=1, #n=factor(n)~, (1==n[1, i]%4)*n[2, i]);
A373591(n) = sum(i=1, #n=factor(n)~, (1==n[1, i]%3)*n[2, i]);
A373592(n) = sum(i=1, #n=factor(n)~, (2==n[1, i]%3)*n[2, i]);
Aux373594(n) = if(n<=3, n, if(isprime(n), 0, [A007814(n), A083025(n), A065339(n), A373591(n), A373592(n)]));
v373594 = rgs_transform(vector(up_to, n, Aux373594(n)));
A373594(n) = v373594[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 13 2024
STATUS
approved
Hypotenuse numbers (squares are sums of 2 nonzero squares).
+10
74
5, 10, 13, 15, 17, 20, 25, 26, 29, 30, 34, 35, 37, 39, 40, 41, 45, 50, 51, 52, 53, 55, 58, 60, 61, 65, 68, 70, 73, 74, 75, 78, 80, 82, 85, 87, 89, 90, 91, 95, 97, 100, 101, 102, 104, 105, 106, 109, 110, 111, 113, 115, 116, 117, 119, 120, 122, 123, 125, 130, 135, 136, 137, 140
OFFSET
1,1
COMMENTS
Multiples of Pythagorean primes A002144 or of primitive Pythagorean triangles' hypotenuses A008846. - Lekraj Beedassy, Nov 12 2003
This is exactly the sequence of positive integers with at least one prime divisor of the form 4k + 1. Compare A072592. - John W. Layman, Mar 12 2008 and Franklin T. Adams-Watters, Apr 26 2009
Circumradius R of the triangles such that the area, the sides and R are integers. - Michel Lagneau, Mar 03 2012
The 2 squares summing to a(n)^2 cannot be equal because sqrt(2) is not rational. - Jean-Christophe Hervé, Nov 10 2013
Closed under multiplication. The primitive elements are those with exactly one prime divisor of the form 4k + 1 with multiplicity one, which are also those for which there exists a unique integer triangle = A084645. - Jean-Christophe Hervé, Nov 11 2013
a(n) are numbers whose square is the mean of two distinct nonzero squares. This creates 1-to-1 mapping between a Pythagorean triple and a "Mean" triple. If the Pythagorean triple is written, abnormally, as {j, k, h} where j^2 +(j+k)^2 = h^2, and h = a(n), then the corresponding "Mean" triple with the same h is {k, 2j, h} where (k^2 + (k+2j)^2)/2 = h^2. For example for h = 5, the Pythagorean triple is {3, 1, 5} and the Mean triple is {1, 6, 5}. - Richard R. Forberg, Mar 01 2015
Integral side lengths of rhombuses with integral diagonals p and q (therefore also with integral areas A because A = pq/2 is some multiple of 24). No such rhombuses are squares. - Rick L. Shepherd, Apr 09 2017
Conjecture: these are bases n in which exists an n-adic integer x satisfying x^5 = x, and 5 is the smallest k>1 such that x^k =x (so x^2, x^3 and x^4 are not x). Example: the 10-adic integer x = ...499879186432 (A120817) satisfies x^5 = x, and x^2, x^3, and x^4 are not x, so 10 is in this sequence. See also A120817, A210850 and A331548. - Patrick A. Thomas, Mar 01 2020
Didactic comment: When students solve a quadratic equation a*x^2 + b*x + c = 0 (a, b, c: integers) with the solution formula, they often make the mistake of calculating b^2 + 4*a*c instead of b^2 - 4*a*c (especially if a or c is negative). If the root then turns out to be an integer, they feel safe. This sequence lists the absolute values of b for which this error can happen. Reasoning: With p^2 = b^2 - 4*a*c and q^2 = b^2 + 4*a*c it follows by addition immediately that p^2 + q^2 = 2*b^2. If 4*a*c < 0, let p = x + y and q = x - y. If 4*a*c > 0, let p = x - y and q = x + y. In both cases follows that y^2 + x^2 = b^2. So every Pythagorean triple gives an absolute value of b for which this error can occur. Example: From (y, x, b) = (3, 4, 5) follows (q^2, b^2, p^2) = (1, 25, 49) or (p^2, b^2, q^2) = (1, 25, 49) with abs(4*a*c) = 24. - Felix Huber, Jul 22 2023
Conjecture: Numbers m such that the limit: Limit_{s->1} zeta(s)*Sum_{k=1..m} [k|m]*A008683(k)*(i^k)/(k^(s - 1)) exists, which is equivalent to numbers m such that abs(Sum_{k=1..m} [k|m]*A008683(k)*(i^k)) = 0. - Mats Granvik, Jul 06 2024
REFERENCES
Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 98-104.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
Steven R. Finch, Landau-Ramanujan Constant [Broken link]
Steven R. Finch, Landau-Ramanujan Constant [From the Wayback machine]
J. Pahikkala, On contraharmonic mean and Pythagorean triples, Elemente der Mathematik, 65:2 (2010), 62-67.
FORMULA
A005089(a(n)) > 0. - Reinhard Zumkeller, Jan 07 2013
a(n) ~ n. - Charles R Greathouse IV, Jan 13 2022
MAPLE
isA009003 := proc(n)
local p;
for p in numtheory[factorset](n) do
if modp(p, 4) = 1 then
return true;
end if;
end do:
false;
end proc:
for n from 1 to 200 do
if isA009003(n) then
printf("%d, ", n) ;
end if;
end do: # R. J. Mathar, Nov 17 2014
MATHEMATICA
f[n_] := Module[{k = 1}, While[(n - k^2)^(1/2) != IntegerPart[(n - k^2)^(1/2)], k++; If[2 * k^2 >= n, k = 0; Break[]]]; k]; A009003 = {}; Do[If[f[n^2] > 0, AppendTo[A009003, n]], {n, 3, 100}]; A009003 (* Vladimir Joseph Stephan Orlovsky, Jun 15 2009 *)
Select[Range[200], Length[PowersRepresentations[#^2, 2, 2]] > 1 &] (* Alonso del Arte, Feb 11 2014 *)
PROG
(PARI) is_A009003(n)=setsearch(Set(factor(n)[, 1]%4), 1) \\ M. F. Hasler, May 27 2012
(PARI) list(lim)=my(v=List(), u=vectorsmall(lim\=1)); forprimestep(p=5, lim, 4, forstep(n=p, lim, p, u[n]=1)); for(i=5, lim, if(u[i], listput(v, i))); u=0; Vec(v) \\ Charles R Greathouse IV, Jan 13 2022
(Haskell)
import Data.List (findIndices)
a009003 n = a009003_list !! (n-1)
a009003_list = map (+ 1) $ findIndices (> 0) a005089_list
-- Reinhard Zumkeller, Jan 07 2013
(Python)
from itertools import count, islice
from sympy import primefactors
def A009003_gen(): # generator of terms
return filter(lambda n:any(map(lambda p: p % 4 == 1, primefactors(n))), count(1))
A009003_list = list(islice(A009003_gen(), 20)) # Chai Wah Wu, Jun 22 2022
CROSSREFS
Complement of A004144. Primes in this sequence give A002144. Same as A146984 (integer contraharmonic means) as sets - see Pahikkala 2010, Theorem 5.
Cf. A083025, A084645 (primitive elements), A084646, A084647, A084648, A084649, A006339.
KEYWORD
nonn
EXTENSIONS
Definition edited by Jean-Christophe Hervé, Nov 10 2013
STATUS
approved
a(n) is the number of integer-sided right triangles with hypotenuse n.
+10
55
0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 4, 0, 0, 1, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 1, 0, 1, 0, 0, 4, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0
OFFSET
1,25
COMMENTS
Or number of ways n^2 can be written as the sum of two positive squares: a(5) = 1: 3^2 + 4^2 = 5^2; a(25) = 2: 7^2 + 24^2 = 15^2 + 20^2 = 25^2. - Alois P. Heinz, Aug 01 2019
REFERENCES
A. H. Beiler, Recreations in the Theory of Numbers, New York: Dover, pp. 116-117, 1966.
LINKS
A. Tripathi, On Pythagorean triples containing a fixed integer, Fib. Q., 46/47 (2008/2009), 331-340. See Theorem 7.
Eric Weisstein's World of Mathematics, Pythagorean Triple
FORMULA
Let n = 2^e_2 * product_i p_i^f_i * product_j q_j^g_j where p_i == 1 mod 4, q_j == 3 mod 4; then a(n) = (1/2)*(product_i (2*f_i + 1) - 1). - Beiler, corrected
8*a(n) + 4 = A046109(n) for n > 0. - Ralf Stephan, Mar 14 2004
a(n) = 0 for n in A004144. - Lekraj Beedassy, May 14 2004
a(A084645(k)) = 1. - Ruediger Jehn, Jan 14 2022
a(A084646(k)) = 2. - Ruediger Jehn, Jan 14 2022
a(A084647(k)) = 3. - Jean-Christophe Hervé, Dec 01 2013
a(A084648(k)) = 4. - Jean-Christophe Hervé, Dec 01 2013
a(A084649(k)) = 5. - Jean-Christophe Hervé, Dec 01 2013
a(n) = A063725(n^2) / 2. - Michael Somos, Mar 29 2015
a(n) = Sum_{k=1..n} Sum_{i=1..k} [i^2 + k^2 = n^2], where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Dec 10 2021
a(A002144(k)^n) = n. - Ruediger Jehn, Jan 14 2022
MAPLE
f:= proc(n) local F, t;
F:= select(t -> t[1] mod 4 = 1, ifactors(n)[2]);
1/2*(mul(2*t[2]+1, t=F)-1)
end proc:
map(f, [$1..100]); # Robert Israel, Jul 18 2016
MATHEMATICA
a[1] = 0; a[n_] := With[{fi = Select[ FactorInteger[n], Mod[#[[1]], 4] == 1 & ][[All, 2]]}, (Times @@ (2*fi+1)-1)/2]; Table[a[n], {n, 1, 99}] (* Jean-François Alcover, Feb 06 2012, after first formula *)
PROG
(PARI) a(n)={my(m=0, k=n, n2=n*n, k2, l2);
while(1, k=k-1; k2=k*k; l2=n2-k2; if(l2>k2, break); if(issquare(l2), m++)); return(m)} \\ brute force, Stanislav Sykora, Mar 18 2015
(PARI) {a(n) = if( n<1, 0, sum(k=1, sqrtint(n^2 \ 2), issquare(n^2 - k^2)))}; /* Michael Somos, Mar 29 2015 */
(PARI) a(n) = {my(f = factor(n/(2^valuation(n, 2)))); (prod(k=1, #f~, if ((f[k, 1] % 4) == 1, 2*f[k, 2] + 1, 1)) - 1)/2; } \\ Michel Marcus, Mar 08 2016
(Python)
from math import prod
from sympy import factorint
def A046080(n): return prod((e<<1)+1 for p, e in factorint(n).items() if p&3==1)>>1 # Chai Wah Wu, Sep 06 2022
CROSSREFS
First differs from A083025 at n=65.
A088111 gives records; A088959 gives where records occur.
Partial sums: A224921.
KEYWORD
nonn
STATUS
approved
Hypotenuses for which there exists a unique integer-sided right triangle.
+10
41
5, 10, 13, 15, 17, 20, 26, 29, 30, 34, 35, 37, 39, 40, 41, 45, 51, 52, 53, 55, 58, 60, 61, 68, 70, 73, 74, 78, 80, 82, 87, 89, 90, 91, 95, 97, 101, 102, 104, 105, 106, 109, 110, 111, 113, 115, 116, 117, 119, 120, 122, 123, 135, 136, 137, 140, 143, 146, 148, 149
OFFSET
1,1
COMMENTS
Numbers whose square is uniquely decomposable into the sum of two nonzero squares: these are those numbers with exactly one prime divisor of the form 4k+1 with multiplicity one. - Jean-Christophe Hervé, Nov 11 2013
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from Zak Seidov)
Eric Weisstein's World of Mathematics, Pythagorean Triple
FORMULA
Terms are obtained by the products A004144(k)*A002144(p) for k, p > 0, ordered by increasing values. - Jean-Christophe Hervé, Nov 12 2013
A046080(a(n)) = 1, A046109(a(n)) = 12. - Jean-Christophe Hervé, Dec 01 2013
MATHEMATICA
r[a_] := {b, c} /. {ToRules[ Reduce[0 < b < c && a^2 == b^2 + c^2, {b, c}, Integers]]}; Select[ Range[150], Length[r[#]] == 1 &] (* Jean-François Alcover, Oct 22 2012 *)
PROG
(PARI) is_a084645(n) = #qfbsolve(Qfb(1, 0, 1), n^2, 3)==3 \\ Hugo Pfoertner, Sep 28 2024
CROSSREFS
Cf. A004144 (0), A084646 (2), A084647 (3), A084648 (4), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).
KEYWORD
nonn,changed
AUTHOR
Eric W. Weisstein, Jun 01 2003
STATUS
approved
Ordered hypotenuse numbers (squares are sums of 2 distinct nonzero squares).
+10
35
5, 10, 13, 15, 17, 20, 25, 25, 26, 29, 30, 34, 35, 37, 39, 40, 41, 45, 50, 50, 51, 52, 53, 55, 58, 60, 61, 65, 65, 65, 65, 68, 70, 73, 74, 75, 75, 78, 80, 82, 85, 85, 85, 85, 87, 89, 90, 91, 95, 97, 100, 100, 101, 102, 104, 105, 106, 109, 110, 111, 113, 115, 116, 117, 119, 120
OFFSET
1,1
COMMENTS
The largest member 'c' of the Pythagorean triples (a,b,c) ordered by increasing c.
If c^2 = a^2 + b^2 (a < b < c) then c^2 = (n^2 + m^2)/2 with n = b - a, m = b + a. - Zak Seidov, Mar 03 2011
Numbers n such that A083025(n) > 0, i.e., n is divisible by at least one prime of the form 4k+1. - Max Alekseyev, Oct 24 2008
A number appears only once in the sequence if and only if it is divisible by exactly one prime of the form 4k+1 with multiplicity one (cf. A084645). - Jean-Christophe Hervé, Nov 11 2013
If c^2 = a^2 + b^2 with a and b > 0, then a <> b: the sum of 2 equal squares cannot be a square because sqrt(2) is not rational. - Jean-Christophe Hervé, Nov 11 2013
REFERENCES
W. L. Schaaf, Recreational Mathematics, A Guide To The Literature, "The Pythagorean Relationship", Chapter 6 pp. 89-99 NCTM VA 1963.
W. L. Schaaf, A Bibliography of Recreational Mathematics, Vol. 2, "The Pythagorean Relation", Chapter 6 pp. 108-113 NCTM VA 1972.
W. L. Schaaf, A Bibliography of Recreational Mathematics, Vol. 3, "Pythagorean Recreations", Chapter 6 pp. 62-6 NCTM VA 1973.
LINKS
Zak Seidov and T. D. Noe, Table of n, a(n) for n = 1..10000 (Zak Seidov entered the first 1981 terms).
Dept. of Pure Math., Univ. Sheffield, Animated Proof of Pythagoras Theorem [Broken link?]
T. Eveilleau, An Experimental Illustration of the Pythagorean Theorem, (requires a flash player)
Kangourou Math Website, L'animation du theoreme de Pythagore
Mathematical Database, Poster, 7 Ways to prove the Pythagorean Theorem
J. S. Silverman, A Friendly Introduction to Number Theory, Chapters 1 to 6 (see Chapters 2 and 3).
G. Villemin's Almanach of Numbers, Triangles & Triplets de Pythagore
Eric Weisstein's World of Mathematics, Pythagorean Triple
MATHEMATICA
max = 120; hypotenuseQ[n_] := For[k = 1, True, k++, p = Prime[k]; Which[Mod[p, 4] == 1 && Divisible[n, p], Return[True], p > n, Return[False]]]; hypotenuses = Select[Range[max], hypotenuseQ]; red[c_] := {a, b, c} /. {ToRules[ Reduce[0 < a <= b && a^2 + b^2 == c^2, {a, b}, Integers]]}; A009000 = Flatten[red /@ hypotenuses, 1][[All, -1]] (* Jean-François Alcover, May 23 2012, after Max Alekseyev *)
PROG
(PARI) list(lim)=my(v=List(), m2, s2, h2, h); for(middle=4, lim-1, m2=middle^2; for(small=1, middle, s2=small^2; if(issquare(h2=m2+s2, &h), if(h>lim, break); listput(v, h)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 23 2017
(PARI) list(lim) = {my(lh = List()); for(u = 2, sqrtint(lim), for(v = 1, u, if (u^2+v^2 > lim, break); if ((gcd(u, v) == 1) && (0 != (u-v)%2), for (i = 1, lim, if (i*(u^2+v^2) > lim, break); /* if (u^2 - v^2 < 2*u*v, w = [i*(u^2 - v^2), i*2*u*v, i*(u^2+v^2)], w = [i*2*u*v, i*(u^2 - v^2), i*(u^2+v^2)]); */ listput(lh, i*(u^2+v^2)); ); ); ); ); vecsort(Vec(lh)); } \\ Michel Marcus, Apr 10 2021
(Python)
from math import isqrt
def aupto(limit):
s = [i*i for i in range(1, limit+1)]
s2 = sorted(a+b for i, a in enumerate(s) for b in s[i+1:])
return [isqrt(k) for k in s2 if k in s]
print(aupto(120)) # Michael S. Branicky, May 10 2021
KEYWORD
nonn,nice,easy
STATUS
approved
Hypotenuses for which there exist exactly 3 distinct integer triangles.
+10
31
125, 250, 375, 500, 750, 875, 1000, 1125, 1375, 1500, 1750, 2000, 2197, 2250, 2375, 2625, 2750, 2875, 3000, 3375, 3500, 3875, 4000, 4125, 4394, 4500, 4750, 4913, 5250, 5375, 5500, 5750, 5875, 6000, 6125, 6591, 6750, 7000, 7125, 7375, 7750
OFFSET
1,1
COMMENTS
Numbers whose square is decomposable in 3 different ways into the sum of two nonzero squares: these are those with exactly one prime divisor of the form 4k+1 with multiplicity three. - Jean-Christophe Hervé, Nov 11 2013
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1140 terms from Jean-Christophe Hervé)
Eric Weisstein's World of Mathematics, Pythagorean Triple
FORMULA
Terms are obtained by the products A004144(k)*A002144(p)^3 for k, p > 0, ordered by increasing values. - Jean-Christophe Hervé, Nov 12 2013
EXAMPLE
a(1) = 125 = 5^3, and 125^2 = 100^2 + 75^2 = 117^2 + 44^2 = 120^2 + 35^2. - Jean-Christophe Hervé, Nov 11 2013
MATHEMATICA
Clear[lst, f, n, i, k] f[n_]:=Module[{i=0, k=0}, Do[If[Sqrt[n^2-i^2]==IntegerPart[Sqrt[n^2-i^2]], k++ ], {i, n-1, 1, -1}]; k/2]; lst={}; Do[If[f[n]==3, AppendTo[lst, n]], {n, 4*5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)
CROSSREFS
Cf. A004144 (0), A084645 (1), A084646 (2), A084648 (4), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Jun 01 2003
STATUS
approved
Hypotenuses for which there exist exactly 4 distinct integer triangles.
+10
31
65, 85, 130, 145, 170, 185, 195, 205, 221, 255, 260, 265, 290, 305, 340, 365, 370, 377, 390, 410, 435, 442, 445, 455, 481, 485, 493, 505, 510, 520, 530, 533, 545, 555, 565, 580, 585, 595, 610, 615, 625, 629, 663, 680, 685, 689, 697, 715, 730, 740, 745
OFFSET
1,1
COMMENTS
Numbers whose square is decomposable in 4 different ways into the sum of two nonzero squares: these are those with exactly 2 distinct prime divisors of the form 4k+1, each with multiplicity one, or with only one prime divisor of this form with multiplicity 4. - Jean-Christophe Hervé, Nov 11 2013
If m is a term, then 2*m and p*m are terms where p is any prime of the form 4k+3. - Ray Chandler, Dec 30 2019
LINKS
Eric Weisstein's World of Mathematics, Pythagorean Triple
EXAMPLE
a(1) = 65 = 5*13, and 65^2 = 52^2 + 39^2 = 56^2 + 33^2 = 60^2 + 25^2 = 63^2 + 16^2. - Jean-Christophe Hervé, Nov 11 2013
MATHEMATICA
Clear[lst, f, n, i, k] f[n_]:=Module[{i=0, k=0}, Do[If[Sqrt[n^2-i^2]==IntegerPart[Sqrt[n^2-i^2]], k++ ], {i, n-1, 1, -1}]; k/2]; lst={}; Do[If[f[n]==4, AppendTo[lst, n]], {n, 6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)
CROSSREFS
Cf. A004144 (0), A084645 (1), A084646 (2), A084647 (3), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Jun 01 2003
STATUS
approved
Hypotenuses for which there exist exactly 5 distinct Pythagorean triangles.
+10
31
3125, 6250, 9375, 12500, 18750, 21875, 25000, 28125, 34375, 37500, 43750, 50000, 56250, 59375, 65625, 68750, 71875, 75000, 84375, 87500, 96875, 100000, 103125, 112500, 118750, 131250, 134375, 137500, 143750, 146875, 150000, 153125
OFFSET
1,1
COMMENTS
Numbers whose square is decomposable in 5 different ways into the sum of two nonzero squares: these are those with exactly one prime divisor of the form 4k+1 with multiplicity 5. - Jean-Christophe Hervé, Nov 12 2013
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1019 terms from Jean-Christophe Hervé)
Eric Weisstein's World of Mathematics, Pythagorean Triple
FORMULA
Terms are obtained by the products A004144(k)*A002144(p)^5 for k, p > 0 ordered by increasing values. - Jean-Christophe Hervé, Nov 12 2013
EXAMPLE
a(1) = 5^5, a(5) = 6*5^5, a(65) = 13^5. - Jean-Christophe Hervé, Nov 12 2013
MATHEMATICA
Clear[lst, f, n, i, k] f[n_]:=Module[{i=0, k=0}, Do[If[Sqrt[n^2-i^2]==IntegerPart[Sqrt[n^2-i^2]], k++ ], {i, n-1, 1, -1}]; k/2]; lst={}; Do[If[f[n]==5, AppendTo[lst, n]], {n, 3*6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)
CROSSREFS
Cf. A004144 (0), A084645 (1), A084646 (2), A084647 (3), A084648 (4), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Jun 01 2003
STATUS
approved

Search completed in 0.022 seconds