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 31-40 of 54 results. Next

A230486 Numbers n such that n^n is representable as the sum of two nonzero squares.

Original entry on oeis.org

5, 10, 13, 17, 20, 25, 26, 29, 30, 34, 37, 40, 41, 50, 52, 53, 58, 60, 61, 65, 68, 70, 73, 74, 78, 80, 82, 85, 89, 90, 97, 100, 101, 102, 104, 106, 109, 110, 113, 116, 120, 122, 125, 130, 136, 137, 140, 145, 146, 148, 149, 150, 156, 157, 160, 164, 169, 170
Offset: 1

Views

Author

Alex Ratushnyak, Oct 20 2013

Keywords

Comments

If n is even, then n must have a prime factor of the form 4k+1. If n is odd, then all prime factors must be of the form 4k+1. - T. D. Noe, Oct 21 2013
The above is also a sufficient condition: the sequence consists exactly in even multiples of Pythagorean primes A002144, and products of such primes (A008846). - M. F. Hasler, Sep 02 2018

Examples

			5^5 = 55^2 + 10^2.
10^10 = 99712^2 + 7584^2.
13^13 = 17106843^2 + 3198598^2.
17^17 = 28735037644^2 + 1240110271^2.
		

References

  • G. H. Hardy and E. M. Wright, Theory of Numbers, Oxford, Sixth Edition, 2008, p. 395.

Crossrefs

Cf. A000312 (n^n), A004431, A132777.
A subsequence of A000404 (numbers that are the sum of 2 nonzero squares).
Sequence A002144 (primes of the form 4k + 1) and A008846 (products of such primes) are subsequences.

Programs

  • Mathematica
    t = {}; Do[f = FactorInteger[n]; p = Transpose[f][[1]]; If[EvenQ[n], If[MemberQ[Mod[p, 4], 1], AppendTo[t, n]], If[Union[Mod[p, 4]] == {1}, AppendTo[t, n]]], {n, 2, 200}]; t (* T. D. Noe, Oct 21 2013 *)
  • PARI
    select( is_A230486(n)={(n=factor(n)[,1]%4) && if(n[1]==2, Set(n)[1]==1, Set(n)==[1])}, [1..200]) \\ M. F. Hasler, Sep 02 2018
    
  • Python
    from itertools import count, islice
    from sympy import primefactors
    def A230486_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda n:all(p&3==1 for p in primefactors(n)) if n&1 else any(p&3==1 for p in primefactors(n)),count(max(startvalue,2)))
    A230486_list = list(islice(A230486_gen(),20)) # Chai Wah Wu, May 15 2023

Formula

A230486 = { n | A000312(n) is in A000404 } = A004277*A002144 U A008846. - M. F. Hasler, Sep 02 2018

Extensions

Extended by T. D. Noe, Oct 21 2013

A239581 Number of primitive Pythagorean triangles (x, y, z) with legs x < y < 10^n.

Original entry on oeis.org

1, 18, 179, 1788, 17861, 178600, 1786011, 17860355, 178603639, 1786036410, 17860362941
Offset: 1

Views

Author

Martin Renner, Mar 26 2014

Keywords

Comments

A Pythagorean triangle is a right triangle with integer side lengths x, y, z forming a Pythagorean triple (x, y, z). It is called primitive, if gcd(x, y, z) = 1.
Because (x, y, z) is equivalent to (y, x, z), the total number of primitive Pythagorean triangles with legs x, y < 10^n is b(n) = 2*a(n) = 2, 36, 358, 3576, 35722, ...

Examples

			a(1) = 1, because the only primitive Pythagorean triangle with x < y < 10 is [3, 4, 5].
		

Crossrefs

Extensions

a(6)-a(11) from Giovanni Resta, Mar 27 2014

A239744 Number of Pythagorean triangles (x, y, z) with legs x < y <= 10^n.

Original entry on oeis.org

2, 63, 1034, 14474, 185864, 2269788, 26809924, 309224756, 3503496007, 39147452729, 432599522197
Offset: 1

Views

Author

Martin Renner, Mar 26 2014

Keywords

Comments

A Pythagorean triangle is a right triangle with integer side lengths x, y, z forming a Pythagorean triple (x, y, z).
Because (x, y, z) is equivalent to (y, x, z), the total number of Pythagorean triangles with legs x, y < 10^n is b(n) = 2*a(n) = 4, 126, 2068, 28948, 371728, ...

Examples

			a(1) = 2, because the only two Pythagorean triangles with x < y < 10 are [3, 4, 5] and [6, 8, 10].
		

Crossrefs

Extensions

a(6)-a(11) from Giovanni Resta, Mar 27 2014

A239786 Number of Pythagorean triangles (x, y, z) with legs x < y < 10^n.

Original entry on oeis.org

2, 62, 1032, 14471, 185860, 2269783, 26809918, 309224749, 3503495999, 39147452720, 432599522187
Offset: 1

Views

Author

Martin Renner, Mar 26 2014

Keywords

Comments

A Pythagorean triangle is a right triangle with integer side length x, y, z forming a Pythagorean triple (x, y, z).
Because (x, y, z) is equivalent to (y, x, z), the total number of Pythagorean triangles with legs x, y < 10^n is b(n) = 2*a(n) = 4, 124, 2064, 28942, ...

Crossrefs

Extensions

a(5)-a(11) from Giovanni Resta, Mar 27 2014

A307880 Hypotenuses of primitive pythagorean triangles having the property that the sum and absolute difference of the shorter legs are both prime numbers.

Original entry on oeis.org

13, 17, 25, 37, 53, 65, 73, 85, 97, 109, 113, 137, 149, 193, 197, 205, 221, 233, 277, 289, 305, 317, 337, 365, 401, 425, 445, 449, 457, 485, 505, 533, 541, 613, 625, 641, 653, 673, 697, 709, 725, 757, 785, 793, 809, 821, 877, 905, 925, 949, 1009
Offset: 1

Views

Author

Torlach Rush, May 02 2019

Keywords

Examples

			13 is a term because 12 + 5 = 17 and 12 - 5 = 7.
17 is a term because 15 + 8 = 23 and 15 - 8 = 7.
25 is a term because 24 + 7 = 31 and 24 - 7 = 17.
		

Crossrefs

Subset of A008846.

Programs

  • Mathematica
    Sqrt[#[[1]]^2+#[[2]]^2]&/@Select[Union[Sort/@({Times@@#,(Last[#]^2-First[ #]^2)/2}&/@(Select[Subsets[Range[1,51,2],{2}],GCD@@#==1&]))],AllTrue[ {Total[#],#[[2]]-#[[1]]},PrimeQ]&]//Union (* Harvey P. Dale, Sep 25 2022 *)

A349536 Consider a circle on the Z X Z lattice with radius equal to the Pythagorean hypotenuse h(n) (A009003); a(n) = number of Pythagorean triples inside a Pi/4 sector of the circle.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32, 33, 34, 35, 37, 38, 39, 40, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 71, 75, 76, 77, 78, 79, 80, 84, 85, 86, 87, 89
Offset: 1

Views

Author

Alexander Kritov, Nov 21 2021

Keywords

Comments

Number of Pythagorean triples with hypotenuse less than or equal to the next one.

Examples

			The count of non-primitive Pythagorean triples as they appear in order of increasing hypotenuse:
.
       Hypotenuse
   n  (A009003(n))       Sides       a(n)
  --  ------------  ---------------  ----
   1        5            (3,4)         1
   2       10            (6,8)         2
   3       13            (5,12)        3
   4       15            (9,12)        4
   5       17            (8,15)        5
   6       20           (12,16)        6
   7       25       (7,24), (15,20)    8
   8       26           (10,24)        9
   9       29           (20,21)       10
		

References

  • W. Sierpinski, Pythagorean Triangles, Dover Publications, 2003.

Crossrefs

Cf. A349538 (extension to the full circle of Z^2 lattice).

Programs

  • C
    // see enclosed main.c
    for (long j=1;j< 101;++j)
    {
    for (long k=1;k< 101;++k)
    {
    if (k<=j)   // to avoid pairs (as we need 1/8 or quarter plane)
        {
              double hyp=sqrt(j*j+k*k);
              double c= (double) floor (hyp );
    if   (fabs(hyp - c) < DBL_EPSILON)  arr[r++]= (long) c;
    }}}
    bubbleSort(arr, r);//sort by hypotenuse increase
    for (long j=0;j< r;++j)
    {
       if  ( arr[j] != arr[j+1] )
        {
            // write to file: j is the sequence value a[n]*2
            // arr[j] is the hypotenuse value
        }
    }

Formula

Conjecture: the increment is a(n+1) - a(n) = 2^(m-1), where m is the sum of all powers of the Pythagorean primes (A002144) in the factorization of hypotenuse h(n+1) (see Eckert for PPT). However, starting from 58 the increment is 3.

A354379 Hypotenuses of Pythagorean triangles whose legs are also hypotenuse numbers (A009003).

Original entry on oeis.org

25, 50, 65, 75, 85, 89, 100, 109, 125, 130, 145, 149, 150, 169, 170, 173, 175, 178, 185, 195, 200, 205, 218, 221, 225, 229, 233, 250, 255, 260, 265, 267, 275, 289, 290, 293, 298, 300, 305, 313, 325, 327, 338, 340, 346, 349, 350, 353, 356, 365, 370, 375, 377, 390, 400
Offset: 1

Views

Author

Lamine Ngom, May 24 2022

Keywords

Comments

If m is in sequence, so is any multiple of m. Primitive elements (terms which are not divisible by any previous term) are A354381.

Examples

			25 is in sequence since each member of the Pythagorean triple (15, 20, 25) belongs to A009003.
The Pythagorean triple (39, 80, 89) has all its terms in A009003. Hence 89 is in sequence.
		

Crossrefs

Programs

  • Maple
    ishyp:= proc(n) local s; ormap(s -> s mod 4 = 1, numtheory:-factorset(n)) end proc:
    filter:= proc(n) local s;
      ormap(s -> ishyp(subs(s,x)) and ishyp(subs(s,y)), [isolve(x^2+y^2=n^2)])
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Jan 10 2023
  • Mathematica
    ishyp[n_] := AnyTrue[FactorInteger[n][[All, 1]], Mod[#, 4] == 1&];
    filter[n_] := AnyTrue[Solve[x^2 + y^2 == n^2, Integers], ishyp[x /. #] && ishyp[y /. #]&];
    Select[Range[400], filter] (* Jean-François Alcover, May 11 2023, after Robert Israel *)

A354381 Primitive elements in A354379, being those not divisible by any previous term.

Original entry on oeis.org

25, 65, 85, 89, 109, 145, 149, 169, 173, 185, 205, 221, 229, 233, 265, 289, 293, 305, 313, 349, 353, 365, 377, 409, 421, 433, 449, 461, 481, 485, 493, 505, 509, 533, 565, 601, 613, 629, 641, 653, 677, 685, 689, 697, 709, 757, 761, 769, 773, 785, 793, 797, 821, 829, 841, 857, 877, 881, 901, 905
Offset: 1

Views

Author

Lamine Ngom, May 24 2022

Keywords

Examples

			The primitive Pythagorean triple (39, 80, 89) has all its terms in A009003, and 89 is not divisible by any previous term. Hence 89 is in sequence.
		

Crossrefs

Programs

  • Maple
    ishyp:= proc(n) local s; ormap(s -> s mod 4 = 1, numtheory:-factorset(n)) end proc:
    filter:= proc(n) local s;
      ormap(s -> ishyp(subs(s,x)) and ishyp(subs(s,y)), [isolve(x^2+y^2=n^2)])
    end proc:
    R:= []: count:= 0:
    for n from 1 while count < 100 do
      if ormap(t -> n mod t = 0, R) then next fi;
      if filter(n) then R:= [op(R),n]; count:= count+1; fi
    od:
    R; # Robert Israel, Jan 10 2023
  • Mathematica
    ishyp[n_] := AnyTrue[ FactorInteger[n][[All, 1]], Mod[#, 4] == 1 &] ;
    filter[n_] := AnyTrue[Solve[x^2 + y^2 == n^2, Integers], ishyp[x /. #] && ishyp[y /. #] &];
    R = {}; count = 0;
    For[n = 1, count < 100, n++, If[AllTrue[R, Mod[n, #] != 0&], If[filter[n], AppendTo[R, n]; count++]]];
    R (* Jean-François Alcover, May 11 2023, after Robert Israel *)

Extensions

Corrected by Robert Israel, Jan 10 2023

A068386 One-thirtieth the area of the unique Pythagorean triangle whose hypotenuse is A002144(n), the n-th prime of the form 4k+1.

Original entry on oeis.org

1, 2, 7, 7, 6, 21, 11, 44, 52, 78, 33, 91, 28, 154, 119, 187, 143, 57, 266, 91, 221, 364, 418, 136, 299, 483, 616, 323, 130, 385, 840, 897, 1020, 1155, 1071, 1235, 266, 782, 203, 986, 1638, 1190, 1653, 1683, 2046, 2387, 1463, 2002, 460, 2852, 2204, 357
Offset: 2

Views

Author

Lekraj Beedassy, Mar 08 2002

Keywords

Comments

Every such prime p has a unique representation as p = r^2 + s^2 with 1 <= r < s. The corresponding right triangle has legs of lengths s^2 - r^2 and 2rs and area rs(s^2 - r^2). For p > 5, this is divisible by 30.
Calling A002330(n) and A002331(n) respectively u and v, we have a(n) = u*v*(u-v)*(u+v), for n > 1. - Lekraj Beedassy, Mar 12 2002
The corresponding Pythagorean triple (A, B, C) with A^2 = B^2 + C^2, (A > B > C) is given by {A002144(n), A002365(n), A002366(n)}, so that a(n) = B*C/(2*30) = A002365(n)*A002366(n)/60. - Lekraj Beedassy, Oct 27 2003

Examples

			The 7th prime of the form 4k+1 is 53 = 2^2 + 7^2. So the right triangle has sides 7^2 - 2^2 = 45, 2*2*7 = 28 and 53. Its area is 1/2 * 45 * 28 = 630, so a(7) = 630/30 = 21.
		

Crossrefs

Programs

  • Mathematica
    a30[p_] := For[r=1, True, r++, If[IntegerQ[s=Sqrt[p-r^2]], Return[r s(s^2-r^2)/30]]]; a30/@Select[Prime/@Range[4, 150], Mod[ #, 4]==1&]
    areat[p_]:=Module[{c=Flatten[PowersRepresentations[p,2,2]],a,b},a= First[c];b= Last[c];((b^2-a^2)(2a b))/2]; areat[#]/30&/@Select[Prime[ Range[4,200]],IntegerQ[(#-1)/4]&] (* Harvey P. Dale, Jun 21 2011 *)

Extensions

Edited by Dean Hickerson, Mar 14 2002

A147718 Primes of the form prime(x)^2 + (prime(x) - 1)^2.

Original entry on oeis.org

5, 13, 41, 313, 1013, 1861, 3613, 7321, 9941, 10513, 13613, 20201, 21013, 34061, 52813, 59513, 99013, 218461, 277513, 353641, 370661, 391613, 424121, 427813, 481181, 584281, 632813, 702113, 750313, 820481, 825613, 904513, 1073113
Offset: 1

Views

Author

Artur Jasinski, Nov 11 2008

Keywords

Comments

These primes are hypotenuses of right triangles in which all sides are natural numbers.

Crossrefs

Programs

  • Mathematica
    aa = {}; Do[If[PrimeQ[Prime[x]^2 + (Prime[x] - 1)^2], AppendTo[aa, Prime[x]^2 + (Prime[x] - 1)^2]], {x, 1, 1000}]; aa
Previous Showing 31-40 of 54 results. Next