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.

Previous Showing 21-30 of 54 results. Next

A156685 Number of primitive Pythagorean triples A^2 + B^2 = C^2 with 0 < A < B < C and gcd(A,B)=1 that have a hypotenuse C that is less than or equal to n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12
Offset: 1

Views

Author

Ant King, Feb 17 2009

Keywords

Comments

D. N. Lehmer has proved that the asymptotic density of a(n) is a(n)/n = 1/(2*Pi) = 0.1591549...

Examples

			There is one primitive Pythagorean triple with a hypotenuse less than or equal to 7 -- (3,4,5) -- hence a(7)=1.
G.f. = x^5 + x^6 + x^7 + x^8 + x^9 + x^10 + x^11 + x^12 + 2*x^13 + 2*x^14 + ...
		

References

  • Lehmer, Derrick Norman; Asymptotic Evaluation of Certain Totient Sums, American Journal of Mathematics, Vol. 22, No. 4, (Oct. 1900), pp. 293-335.

Crossrefs

Programs

  • Haskell
    a156685 n = a156685_list !! (n-1)
    a156685_list = scanl1 (+) a024362_list  -- Reinhard Zumkeller, Dec 02 2012
    
  • Mathematica
    RightTrianglePrimitiveHypotenuses[1]:=0;RightTrianglePrimitiveHypotenuses[n_Integer?Positive]:=Module[{f=Transpose[FactorInteger[n]],a,p,mod1posn},{p,a}=f;mod1=Select[p,Mod[ #,4]==1&];If[Length[a]>Length[mod1],0,2^(Length[mod1]-1)]];RightTrianglePrimitiveHypotenuses[ # ] &/@Range[75]//Accumulate
  • PARI
    a(n)=sum(a=1,n-2,sum(b=a+1,sqrtint(n^2-a^2), gcd(a,b)==1 && issquare(a^2+b^2))) \\ Charles R Greathouse IV, Apr 29 2013

Formula

Essentially partial sums of A024362.

A164620 Primes p such that 1 +p*floor(p/2) is also prime.

Original entry on oeis.org

2, 5, 13, 17, 41, 61, 89, 97, 101, 113, 149, 173, 229, 241, 281, 317, 349, 353, 373, 397, 409, 421, 433, 461, 509, 521, 661, 673, 761, 853, 881, 937, 941, 1013, 1093, 1109, 1249, 1289, 1297, 1373, 1433, 1549, 1741, 1753, 1913, 2113, 2213, 2269, 2281, 2297
Offset: 1

Views

Author

Keywords

Examples

			p=2 qualifies since 2*1+1=3 is prime. p=5 qualifies since 5*2+1=11 is prime.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p*Floor[p/2]+1],AppendTo[lst,p]],{n,3*6!}]; lst
    Select[Prime[Range[350]],PrimeQ[1+#*Floor[#/2]]&] (* Harvey P. Dale, Apr 07 2015 *)

Extensions

Comments turned into examples by R. J. Mathar, Sep 17 2009

A277557 The ordered image of the 1-to-1 mapping of an integer ordered pair (x,y) into an integer using Cantor's pairing function, where 0 < x < y, gcd(x,y)=1 and x+y odd.

Original entry on oeis.org

8, 18, 19, 32, 33, 34, 50, 52, 53, 72, 73, 74, 75, 76, 98, 99, 100, 101, 102, 103, 128, 131, 133, 134, 162, 163, 164, 165, 166, 167, 168, 169, 200, 201, 202, 203, 204, 205, 206, 207, 208, 242, 244, 247, 248, 250, 251, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 338
Offset: 1

Views

Author

Frank M Jackson, Oct 19 2016

Keywords

Comments

The mapping of the ordered pair (x,y) to an integer uses Cantor's pairing function to generate the integer as (x+y)(x+y+1)/2+y. Also for every ordered pair (x,y) such that 0 < x < y, gcd(x,y)=1 and x+y odd, there exists a primitive Pythagorean triple (PPT) (a, b, c) such that a = y^2-x^2, b = 2xy, c = x^2+y^2. Therefore each term in the sequence represents a unique PPT.
Numbers n for which 0 < A025581(n) < A002262(n) and A025581(n)+A002262(n) is odd, and gcd(A025581(n), A002262(n)) = 1. [The definition expressed with A-numbers.] - Antti Karttunen, Nov 02 2016
See also the triangle T(y, x) with the values for PPTs given in A278147. - Wolfdieter Lang, Nov 24 2016

Examples

			a(5)=33 because the ordered pair (2,5) maps to 33 by Cantor's pairing function (see below) and is the 5th such occurrence. Also x=2, y=5 generates a PPT with sides (21,20,29).
Note: Cantor's pairing function is simply A001477 in its two-argument tabular form A001477(k, n) = n + (k+n)*(k+n+1)/2, thus A001477(2,5) = 5 + (2+5)*(2+5+1)/2 = 33. - _Antti Karttunen_, Nov 02 2016
		

Crossrefs

Cf. A020882 (is obtained when A048147(a(n)) is sorted into ascending order), A008846 (same with duplicates removed).

Programs

  • Mathematica
    Cantor[{i_, j_}] := (i+j)(i+j+1)/2+j; getparts[n_] := Reverse@Select[Reverse[IntegerPartitions[n, {2}], 2], GCD@@#==1 &]; pairs=Flatten[Table[getparts[2n+1], {n, 1, 20}], 1]; Table[Cantor[pairs[[n]]], {n, 1, Length[pairs]}]

A072592 Even numbers with at least one prime factor of form 4*k+1.

Original entry on oeis.org

10, 20, 26, 30, 34, 40, 50, 52, 58, 60, 68, 70, 74, 78, 80, 82, 90, 100, 102, 104, 106, 110, 116, 120, 122, 130, 136, 140, 146, 148, 150, 156, 160, 164, 170, 174, 178, 180, 182, 190, 194, 200, 202, 204, 208, 210, 212, 218, 220, 222, 226, 230, 232, 234, 238
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2002

Keywords

Comments

Conjecture: this is exactly the sequence whose terms are twice those of A009003. (This has been verified for all terms<=500.) Compare A009003. - John W. Layman, Mar 12 2008
The conjecture is true. See comments on A008846 and A004613. - Lambert Herrgesell (zero815(AT)googlemail.com), Apr 24 2008

Crossrefs

Programs

Formula

A072591(a(n)) = 0.

A087937 Prime hypotenuse of primitive Pythagorean triangles with even short leg (or odd long leg).

Original entry on oeis.org

17, 29, 37, 53, 73, 101, 109, 137, 173, 197, 229, 241, 257, 281, 293, 349, 373, 397, 401, 409, 449, 457, 509, 577, 593, 601, 641, 661, 677, 701, 733, 757, 809, 829, 857, 877, 941, 977, 997, 1021, 1033, 1049, 1061, 1093, 1153, 1181, 1193, 1229, 1237, 1277
Offset: 1

Views

Author

Lekraj Beedassy, Oct 27 2003

Keywords

Comments

Ordered intersection of A002144 and A081985.
These same triangles have the property that sqrt(h+c) = t, where h = a(n), c is the even short leg, t is an integer and the odd long leg is an odd multiple of t, but it appears there are no cases where that multiple is 1, in contrast with the similar property that applies to the triangles of A087937. Also see A008846. - Richard R. Forberg, May 11 2016

Crossrefs

Extensions

More terms from Ray Chandler, Oct 28 2003

A208853 Array of hypotenuses of primitive Pythagorean triangles when read by SW-NE diagonals.

Original entry on oeis.org

5, 13, 17, 29, 25, 37, 53, 41, 0, 65, 85, 65, 61, 73, 101, 125, 97, 85, 89, 109, 145, 173, 137, 0, 113, 0, 0, 197, 229, 185, 157, 145, 149, 169, 205, 257, 293, 241, 205, 185, 181, 193, 221, 265, 325, 365, 305, 0, 233, 221, 0
Offset: 1

Views

Author

Wolfdieter Lang, Mar 05 2012

Keywords

Comments

All primitive Pythagorean triples (see the links) (a,b,c), with a odd, b even, hence c odd, are given by c=u^2 + v^2, with u odd, u=2*n+1, n>=1, v even, v=2*m, m>=1, and gcd(u,v)=1. The present array is c=c(n,m) = (2*n-1)^2 + (2*m)^2, if gcd(2*n-1,2*m)=1 and 0 otherwise. The corresponding triangle, read by SW-NE diagonals, is T(n,m):= c(n-m+1,m). The 0 entries indicate that there are only non-primitive triples for these n,m values. See the example section for the scaling factor g=gcd(u,v)^2 for such non-primitive triangles.
For the increasingly ordered c-values see A008846 (with multiplicity see A020882).
All primitive Pythagorean triples are given by
(a(n,m)=A208854(n,m), b(n,m)=A208855(n,m), c(n,m)), n>=1, m>=1. If this is (0,0,0) then no primitive triple exists for these n,m values. See the example section.
In the prime factorization of c(n,m) (which is odd) all prime factors are of the type 4*k+1 (see A002144). See the Niven-Zuckerman-Montgomery reference, Theorem 3.20, p. 164. For the general representation of positive integers as the sum of two squares see Theorem 2.15 by Fermat, p. 55. E.g.: c(5,2) = 85 = 5*17. c = 5*7^2 = 245 has a non-primitive solution 7^2*(1^2 + 2^2) = 7^2*c(1,1), therefore c(4,7)=0 in this array.
The triples with an even cathetus (b) and the hypotenuse (c) differing by 1 unit are (2*k+1, 4*T(k), 4*T(k)+1), k >= 1, with the triangular numbers A000217. The c values are given in A001844. E.g., (n,m)=(1,1), k=1. (3,4,5); (n,m)=(2,1), k=2, (5,12,13); (n,m)=(2,2), k=3, (7,24,25). See the example section for the table.
The triples with an odd cathetus (a) and the hypotenuse differing by 2 units are (4*k^2-1, 4*k, 4*k^2+1), k >= 1. These triples are given in (A000466(k), A008586(k), A053755(k)). E.g., (n,m)=(1,4), k=4, (63,16,65).
The triples with the catheti differing by one length unit are generated by a substitution rule for the (u,v) values starting with (1,1). See a Wolfdieter Lang comment on A001653 for this rule. - Wolfdieter Lang, Mar 08 2012

Examples

			Triangle T(n,m):
......m|  1     2     3     4    5    6     7     8    9    10 ...
......v|  2     4     6     8   10   12    14    16   18    20 ...
n,  u
1,  1     5
2,  3    13    17
3,  5    29    25    37
4,  7    53    41     0    65
5,  9    85    65    61    73  101
6, 11   125    97    85    89  109  145
7, 13   173   137     0   113    0    0   197
8, 15   229   185   157   145  149  169   205   257
9, 17   293   241   205   185  181  193   221   265  325
10,19   365   305     0   233  221    0     0   281    0   401
...
Array c(n,m):
......m|  1    2    3     4     5    6     7     8    9    10 ...
......v|  2    4    6     8    10   12    14    16   18    20 ...
n,  u
1,  1     5   17   37    65   101  145   197   257  325   401
2   3    13   25    0    73   109    0   205   265    0   409
3,  5    29   41   61    89     0  169   221   281  349     0
4,  7    53   65   85   113   149  193     0   305  373   449
5,  9    85   97    0   145   181    0   277   337    0   481
6, 11   125  137  157   185   221  265   317   377  445   521
7, 13   173  185  205   233   269  313   365   425  493   569
8, 15   229  241    0   289     0    0   421   481    0     0
9, 17   293  305  325   353   389  433   485   545  613   689
10,19   365  377  397   425   461  505   557   617  685   761
...
------------------------------------------------------------------
Array of triples (a(n,m)=A208854,b(n,m)=A208855,c(n,m)):
......m|    1           2               3             4  ...
......v|    2           4               6             8  ...
n,  u
1,  1    (3,4,5)     (15,8,17)      (35,12,37)     (63,16,65)
2,  3    (5,12,13)   (7,24,25)       (0,0,0)       (55,48,73)
3,  5   (21,20,29)   (9,40,41)      (11,60,61)     (39,80,89)
4,  7   (45,28,53)   (33,56,65)     (13,84,85)    (15,112,113)
5,  9   (77,36,85)   (65,72,97)      (0,0,0)      (17,144,145)
6, 11  (117,44,125) (105,88,137)   (85,132,157)   (57,176,185)
7, 13  (165,52,173) (153,104,185)  (133,156,205) (105,208,233)
8, 15  (221,60,229) (209,120,241)    (0,0,0)     (161,240,289)
9, 17  (285,68,293) (273,136,305)  (253,204,325) (225,272,353)
10,19  (357,76,365) (345,152,377)  (325,228,397) (297,304,425)
...
Array continued:
Array of triples (a(n,m)=A208854,b(n,m)=A208855,c(n,m)):
......m|     5            6               7           8  ...
......v|    10           12              14          16  ...
n,  u
1,  1   (99,20,101)  (143,24,145)  (195,28,197)  (255,32,257)
2   3   (91,60,109)     (0,0,0)    (187,84,205)  (247,96,265)
3,  5    (0,0,0)     (119,120,169) (171,140,221) (231,160,281)
4,  7  (51,140,149)  (95,168,193)     (0,0,0)    (207,224,305)
5,  9  (19,180,181)     (0,0,0)    (115,252,277) (175,288,337)
6, 11  (21,220,221)  (23,264,265)  (75,308,317)  (135,352,377)
7, 13  (69,260,269)  (25,312,313)  (27,364,365)  (87,416,425)
8, 15     (0,0,0)       (0,0,0)    (29,420,421)  (31,480,481)
9, 17  (189,340,389) (145,408,433) (93,476,485)  (33,544,545)
10,19  (261,380,461) (217,456,505) (165,532,557) (105,608,617)
...
(0,0,0) indicates that no primitive Pythagorean triangle exists for these (n,m) values. The corresponding scaled triples would be (a,b,c) = g*(a/g,b/g,c/g), with g=gcd(u,v)^2 for such non-primitive triangles. E.g., c(n,m) = c(5,3) = 0, (u,v) = (9,6), g = 3^2, (45,108,117) = 3^2*(45/9,108/9,117/9) = 9*(5,12,13). The scaling factor for the primitive triangle (5,12,13), tabulated for c(n,m)=(2,1), is here 9.
		

References

  • I. Niven, H. S. Zuckerman and H.L. Montgomery, An Introduction to the Theory of Numbers, 5th edition, Wiley & Sons, New York, 1991

Crossrefs

Formula

T(n,m) = c(n-m+1,m), n >= m >= 1, with c(n,m) := (2*n-1)^2 + (2*m)^2, if gcd(2*n-1, 2*m) = 1 and 0 otherwise.

A239381 a(0) = 3, the least length of a Primitive Pythagorean Triangle (PPT). a(n) is the least hypotenuse of a PPT which has a(n-1) as one of its legs.

Original entry on oeis.org

3, 5, 13, 85, 157, 12325, 90733, 2449525, 28455997, 295742792965, 171480834409967437, 656310093705697045, 1616599508725767821225590944157, 4461691012090851100342993272805, 115366949386695884000892071602798585632943213, 12002377162350258332845595301471273220420939451301220405
Offset: 0

Views

Author

Robert G. Wilson v, Mar 17 2014

Keywords

Comments

a(0)=3 because A042965(3)=3 with comments.
If we relax the Primitive restriction, i.e., GCD(x,y,z) can exceed 1, then we have A018928.

Examples

			a(0)=3 by definition,
a(1)=5 because it is the hypotenuse of a 3-4-5 PPT,
a(2)=13 because it is the hypotenuse of a 5-12-13 PPT,
a(3)=85 because it is the hypotenuse of a 13-84-85 PPT,
a(4)=157 because it is the hypotenuse of a 85-132-157 PPT, 85 is also the leg of a 85-3612-3613 PPT but its hypotenuse is larger, etc.
		

Crossrefs

Programs

  • Mathematica
    f[s_List] := Block[{x = s[[-1]]}, Append[s, Transpose[ Solve[x^2 + y^2 == z^2 && GCD[x, y, z] == 1 && y > 0 && z > 0, {y, z}, Integers]][[-1, 1, 2]]]]; lst = Nest[f, {3}, 15]

A376210 Numbers k for which among all possible Pythagorean triangles with the hypotenuse 4*k+1, the minimum of the lengths of the shorter legs is even.

Original entry on oeis.org

4, 7, 9, 13, 16, 18, 25, 27, 34, 43, 49, 57, 60, 64, 70, 73, 81, 87, 93, 99, 100, 102, 111, 112, 114, 121, 123, 127, 133, 144, 148, 150, 157, 160, 165, 169, 175, 183, 186, 189, 196, 202, 207, 211, 214, 219, 225, 235, 241, 244, 249, 255, 256, 258, 262, 265, 273
Offset: 1

Views

Author

Hugo Pfoertner, Sep 21 2024

Keywords

Examples

			       Hypotenuses                A376210
       4k+1                       |  A376211
   k   A008846                    |  |  A376208
   |   |  Sorted legs [x,y] of    |  |  |  A375750
   |   |  Pythagorean triangles   |  |  |  |  A376209
   1   5  [3,4]                   .  X  .  X  .
   3  13  [5,12]                  .  X  .  X  .
   4  17  [8,15]                  X  .  X  .  .
   6  25  [7,24]                  .  X  .  X  .
   7  29  [20,21]                 X  .  X  .  .
   9  37  [12,35]                 X  .  X  .  .
  10  41  [9,40]                  .  X  .  X  .
  13  53  [28,45]                 X  .  X  .  .
  15  61  [11,60]                 .  X  .  X  .
  16  65  [16,63],[33,56],[39,52] X  .  X  X  X
  18  73  [48,55]                 X  .  X  .  .
  21  85  [13,84],[36,77],[51,68] .  X  X  X  X
		

Crossrefs

({A087937}-1)/4 is a subsequence.

Programs

  • PARI
    is_a376210_1(n,r=0) = my(c=4*n+1, q=qfbsolve(Qfb(1,0,1), c^2, 3), qd=#q); if(qd<2, 0, my(a=vecmin(abs(concat(q))[1..2*(qd-1)]), b=sqrtint(c^2-a^2)); a%2==r && gcd([a,b,c])==1)

A057229 a(n) = a*b = x*y with (a-b) = (x+y) = A020882(n) (a>b, a>0, b>0, x>0, y>0), gcd(a, b) = gcd(x, y) = 1.

Original entry on oeis.org

6, 30, 60, 84, 210, 210, 180, 630, 330, 504, 924, 1320, 546, 1386, 1560, 2340, 990, 2730, 840, 2574, 4620, 1224, 1716, 3570, 5610, 7140, 4290, 1710, 5016, 7956, 7980, 2730, 7854, 10374, 2310, 11970, 6630, 10920, 12540, 4080, 3036, 11856, 8970
Offset: 0

Views

Author

Naohiro Nomoto, Sep 19 2000

Keywords

Comments

The quadratics in X, X^2 - S*X -+ P, where S=A020882(n), P=A057229(n) are each factorizable into two factors, all four being distinct: X^2 - S*X - P = (X - a)*(X + b). X^2 - S*X + P = (X - x)*(X - y). - Lekraj Beedassy, Apr 30 2004
Areas of primitive Pythagorean triangles sorted on hypotenuse A020882, then on perimeter A093507. - Lekraj Beedassy, Aug 18 2006

Examples

			E.g. a(1)=6=6*1=3*2, (6-1)=(3+2)=5=A020882(1), gcd(6,1)=gcd(3,2)=1
		

Crossrefs

A087938 Prime hypotenuse of primitive Pythagorean triangles with odd short leg (or even long leg).

Original entry on oeis.org

5, 13, 41, 61, 89, 97, 113, 149, 157, 181, 193, 233, 269, 277, 313, 317, 337, 353, 389, 421, 433, 461, 521, 541, 557, 569, 613, 617, 653, 673, 709, 761, 769, 773, 797, 821, 853, 881, 929, 937, 953, 1009, 1013, 1069, 1097, 1109, 1117, 1129, 1201, 1213, 1217
Offset: 1

Views

Author

Lekraj Beedassy, Oct 27 2003

Keywords

Comments

Ordered intersection of A002144 and A081961.
These same triangles have the property that sqrt(h+b) = t, where h = a(n), b is the even long leg, t is an odd integer, and the odd short leg is an odd multiple of t, including some instances where that multiple is 1 (i.e., t equals the short leg). A similar property applies to the triangles of A087937. Also see A008846. - Richard R. Forberg, May 11 2016

Crossrefs

Extensions

Corrected and extended by Ray Chandler, Oct 28 2003
Previous Showing 21-30 of 54 results. Next