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 11-20 of 23 results. Next

A070079 a(n) gives the odd leg of the unique primitive Pythagorean triangle with hypotenuse A002144(n).

Original entry on oeis.org

3, 5, 15, 21, 35, 9, 45, 11, 55, 39, 65, 99, 91, 15, 105, 51, 85, 165, 19, 95, 195, 221, 105, 209, 255, 69, 115, 231, 285, 25, 75, 175, 299, 225, 275, 189, 325, 399, 391, 29, 145, 351, 425, 261, 459, 279, 341, 165, 231, 575, 465, 551, 35, 105, 609, 315, 589, 385, 675
Offset: 1

Views

Author

Lekraj Beedassy, May 06 2002

Keywords

Comments

Consider sequence A002144 of primes congruent to 1 (mod 4) and equal to x^2 + y^2, with y>x given by A002330 and A002331; sequence gives values y^2 - x^2.
Odd legs of primitive Pythagorean triangles with unique (prime) hypotenuse (A002144), sorted on the latter. Corresponding even legs are given by 4*A070151 (or A145046). - Lekraj Beedassy, Jul 22 2005

Examples

			The following table shows the relationship
between several closely related sequences:
Here p = A002144 = primes == 1 mod 4, p = a^2+b^2 with a < b;
a = A002331, b = A002330, t_1 = ab/2 = A070151;
p^2 = c^2+d^2 with c < d; c = A002366, d = A002365,
t_2 = 2ab = A145046, t_3 = b^2-a^2 = A070079,
with {c,d} = {t_2, t_3}, t_4 = cd/2 = ab(b^2-a^2).
---------------------------------
.p..a..b..t_1..c...d.t_2.t_3..t_4
---------------------------------
.5..1..2...1...3...4...4...3....6
13..2..3...3...5..12..12...5...30
17..1..4...2...8..15...8..15...60
29..2..5...5..20..21..20..21..210
37..1..6...3..12..35..12..35..210
41..4..5..10...9..40..40...9..180
53..2..7...7..28..45..28..45..630
.................................
		

Crossrefs

Programs

  • Mathematica
    pp = Select[ Range[200] // Prime, Mod[#, 4] == 1 &]; f[p_] := y^2 - x^2 /. ToRules[ Reduce[0 <= x <= y && p == x^2 + y^2, {x, y}, Integers]]; A070079 = f /@ pp (* Jean-François Alcover, Jan 15 2015 *)

Formula

a(n)=A079886(n)*A079887(n) - Benoit Cloitre, Jan 13 2003
a(n) is the odd positive integer with A080109(n) = A002144(n)^2 = a(n)^2 + (4*A070151(n))^2, in this unique decomposition into positive squares (up to order). See the Lekraj Beedassy, comment. - Wolfdieter Lang, Jan 13 2015

Extensions

More terms from Benoit Cloitre, Jan 13 2003
Edited: Used a different name and moved old name to the comment section. - Wolfdieter Lang, Jan 13 2015

A331435 a(n) is the least positive k such that A028916(n) - k^2 is a fourth power.

Original entry on oeis.org

1, 2, 1, 6, 5, 4, 10, 11, 10, 14, 15, 1, 14, 5, 9, 20, 21, 24, 19, 4, 6, 26, 26, 12, 14, 29, 16, 31, 29, 22, 24, 31, 34, 1, 26, 5, 28, 35, 40, 19, 41, 39, 44, 38, 29, 45, 42, 4, 6, 35, 51, 16, 46, 20, 51, 54, 55, 56, 56, 30, 52, 54, 34, 36, 56, 58, 40, 9, 11
Offset: 1

Views

Author

Rémy Sigrist, Jan 18 2020

Keywords

Examples

			The first terms, alongside A028916(n), are:
  n   a(n)  A028916(n)
  --  ----  ----------------
   1     1    2 =  1^2 + 1^4
   2     2    5 =  2^2 + 1^4
   3     1   17 =  1^2 + 2^4
   4     6   37 =  6^2 + 1^4
   5     5   41 =  5^2 + 2^4
   6     4   97 =  4^2 + 3^4
   7    10  101 = 10^2 + 1^4
   8    11  137 = 11^2 + 2^4
   9    10  181 = 10^2 + 3^4
  10    14  197 = 14^2 + 1^4
		

Crossrefs

See A002331, A331521, A331522, A331523, A331524, A331525, A331526 and A331527 for similar sequences.

Programs

  • PARI
    See Links section.

A079887 Values of y-x where p runs through the primes of form 4k+1 and p=x^2+y^2, 0<=x<=y.

Original entry on oeis.org

1, 1, 3, 3, 5, 1, 5, 1, 5, 3, 5, 9, 7, 1, 7, 3, 5, 11, 1, 5, 13, 13, 5, 11, 15, 3, 5, 11, 15, 1, 3, 7, 13, 9, 11, 7, 13, 19, 17, 1, 5, 13, 17, 9, 17, 9, 11, 5, 7, 23, 15, 19, 1, 3, 21, 9, 19, 11, 25, 21, 7, 25, 17, 1, 13, 5, 15, 23, 11, 17, 5, 25, 23, 9, 3, 5, 19, 15, 27, 25, 13, 1, 19, 29, 27
Offset: 1

Views

Author

Benoit Cloitre, Jan 13 2003

Keywords

Comments

Also values of x where p runs through the primes of form 4k+1 and 2*p=x^2+y^2, 0<=xColin Barker, Jul 07 2014

Crossrefs

Programs

  • Mathematica
    pp = Select[ Range[200] // Prime, Mod[#, 4] == 1 &]; f[p_] := y - x /. ToRules[ Reduce[0 <= x <= y && p == x^2 + y^2, {x, y}, Integers]]; A079887 = f /@ pp (* Jean-François Alcover, Jan 15 2015 *)

Formula

a(n) = A002330(n+1)-A002331(n+1). - R. J. Mathar, Jan 09 2017

A079886 Values of x+y where p runs through the primes of form 4k+1 and p=x^2+y^2, 0<=x<=y.

Original entry on oeis.org

3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 11, 13, 15, 15, 17, 17, 15, 19, 19, 15, 17, 21, 19, 17, 23, 23, 21, 19, 25, 25, 25, 23, 25, 25, 27, 25, 21, 23, 29, 29, 27, 25, 29, 27, 31, 31, 33, 33, 25, 31, 29, 35, 35, 29, 35, 31, 35, 27, 31, 37, 29, 35, 39, 37, 39, 37, 33, 39, 37, 41, 33
Offset: 1

Views

Author

Benoit Cloitre, Jan 13 2003

Keywords

Comments

Also values of y where p runs through the primes of form 4k+1 and 2*p=x^2+y^2, 0 Colin Barker, Jul 07 2014

Crossrefs

Programs

  • Maple
    N:= 100: # to get values corresponding to primes <= 4*N+1
    P:= select(isprime, [seq(4*i+1,i=0..N)]):
    F:= proc(p) local f; f:= GaussInt:-GIfactors(p)[2][1][1]; abs(Re(f))+abs(Im(f)) end proc:
    map(F,P); # Robert Israel, Jul 07 2014
  • Mathematica
    pp = Select[ Range[200] // Prime, Mod[#, 4] == 1 &]; f[p_] := x + y /. ToRules[ Reduce[0 <= x <= y && p == x^2 + y^2, {x, y}, Integers]]; A079886 = f /@ pp (* Jean-François Alcover, Jan 15 2015 *)

A122924 Express n as the sum of four squares, x^2+y^2+z^2+w^2, x>=y>=z>=w>=0, sequentially minimizing the value of x, y and z. a(n) is that w.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 2, 0, 1, 3, 1, 2, 1, 2, 0, 1, 3, 1, 2, 1, 2, 0, 1, 3, 1, 2, 2, 2, 1, 0, 3, 1, 3, 1, 2, 1, 2, 4, 2, 3, 1, 3, 1, 2, 1, 2, 4, 2, 3, 1, 3, 1, 2, 2, 2, 4, 3, 3, 2, 3, 1, 0, 1, 2, 4, 2, 4, 2, 3, 0, 3, 1, 3, 5, 2, 4, 2, 4
Offset: 0

Views

Author

Keywords

Examples

			10 = 2^2 + 2^2 + 1^2 + 1^2, so a(10) = 1. The only representation for 11 is 3^2 + 1^2 + 1^2 + 0^2, so a(11) = 1.
		

Crossrefs

A144954 a(n) = start of a sequence of at least n consecutive primes, p_1, p_2, ..., p_n (say), all == 1 mod 4, such that A(p_1) > A(p_2) > ... > A(p_n), where A(p) (see A145010) is the area of the Pythagorean triangle with hypotenuse p.

Original entry on oeis.org

5, 37, 157, 1277, 4441, 8669, 14533, 883241, 10006957, 530551397, 931953301, 931953301
Offset: 1

Views

Author

David Broadhurst, Feb 24 2009

Keywords

Comments

Prompted by a question from Shiv K. Gupta to the Number Theory mailing list.

Examples

			Comment from _M. F. Hasler_, Feb 24 2009:
The first sequence of 12 such primes is the one starting at a(12) =
931953301 = [27050, 14151]^2 ; area = 203431499448450450
931953389 = [26050, 15917]^2 ; area = 176325413694076350
931953397 = [25239, 17174]^2 ; area = 148267841956285170
931953409 = [24528, 18175]^2 ; area = 120941067830427600
931953433 = [30332, 3453 ]^2 ; area = 95111855933417940
931953437 = [23846, 19061]^2 ; area = 93319265825216970
931953469 = [30462, 2005 ]^2 ; area = 56429222392003890
931953509 = [30478, 1745 ]^2 ; area = 49241224048436490
931953569 = [30487, 1580 ]^2 ; area = 44651199683914740
931953637 = [22166, 20991]^2 ; area = 23594434443844350
931953709 = [30525 , 422 ]^2 ; area = 12000420304268550
931953733 = [21793, 21378]^2 ; area = 8346882442487610
		

Crossrefs

Cf. A145010, A002144, A002330, A002331. See A144960 for the actual primes.

Programs

  • PARI
    A144954( n, p=5, verbose=0, L=[0])={ for( i=1,n-1, while(( p=nextprime(p+2)) % 4 !=1,); mn=sum2sqr_prime(p); L=if( L[i] > A=mn[1]*mn[2]*abs(mn[1]^2-mn[2]^2), concat( L, A), i=0; [A]) ); for( i=0,n-1, i & while( 1 != (p=precprime(p-2)) % 4,); verbose & print( p" = " sum2sqr_prime(p) "^2 ; area = " L[n-i])); p} \\ M. F. Hasler, Feb 24 2009

Formula

a(n) = min { A002144(k) | A145010(k) > A145010(k+1) > ... > A145010(k+n-1)}. - M. F. Hasler, Feb 26 2009

A145010 a(n) = area of Pythagorean triangle with hypotenuse p, where p = A002144(n) = n-th prime == 1 (mod 4).

Original entry on oeis.org

6, 30, 60, 210, 210, 180, 630, 330, 1320, 1560, 2340, 990, 2730, 840, 4620, 3570, 5610, 4290, 1710, 7980, 2730, 6630, 10920, 12540, 4080, 8970, 14490, 18480, 9690, 3900, 11550, 25200, 26910, 30600, 34650, 32130, 37050, 7980, 23460, 6090, 29580, 49140, 35700
Offset: 1

Views

Author

M. F. Hasler, Feb 24 2009

Keywords

Comments

Pythagorean primes, i.e., primes of the form p = 4k+1 = A002144(n), have exactly one representation as sum of two squares: A002144(n) = x^2+y^2 = A002330(n+1)^2+A002331(n+1)^2. The corresponding (primitive) integer-sided right triangle with sides { 2xy, |x^2-y^2| } = { A002365(n), A002366(n) } has area xy|x^2-y^2| = a(n). For n>1 this is a(n) = 30*A068386(n).

Examples

			The following table shows the relationship between several closely related sequences:
Here p = A002144 = primes == 1 (mod 4), p = a^2+b^2 with a < b;
a = A002331, b = A002330, t_1 = ab/2 = A070151;
p^2 = c^2+d^2 with c < d; c = A002366, d = A002365,
t_2 = 2ab = A145046, t_3 = b^2-a^2 = A070079,
with {c,d} = {t_2, t_3}, t_4 = cd/2 = ab(b^2-a^2).
  ---------------------------------
   p  a  b  t_1  c   d t_2 t_3  t_4
  ---------------------------------
   5  1  2   1   3   4   4   3    6
  13  2  3   3   5  12  12   5   30
  17  1  4   2   8  15   8  15   60
  29  2  5   5  20  21  20  21  210
  37  1  6   3  12  35  12  35  210
  41  4  5  10   9  40  40   9  180
  53  2  7   7  28  45  28  45  630
		

Crossrefs

Programs

  • Mathematica
    Reap[For[p = 2, p < 500, p = NextPrime[p], If[Mod[p, 4] == 1, area = x*y/2 /. ToRules[Reduce[0 < x <= y && p^2 == x^2 + y^2, {x, y}, Integers]]; Sow[area]]]][[2, 1]] (* Jean-François Alcover, Feb 04 2015 *)
  • PARI
    forprime(p=1,499, p%4==1 | next; t=[p,lift(-sqrt(Mod(-1,p)))]; while(t[1]^2>p,t=[t[2],t[1]%t[2]]); print1(t[1]*t[2]*(t[1]^2-t[2]^2)","))
    
  • PARI
    {Q=Qfb(1,0,1);forprime(p=1,499,p%4==1|next;t=qfbsolve(Q,p); print1(t[1]*t[2]*(t[1]^2-t[2]^2)","))} \\ David Broadhurst

Formula

a(n) = A002365(n)*A002366(n)/2.
a(n) = x*y*(x^2-y^2), where x = A002330(n+1), y = A002331(n+1).

A217503 Squared distance between consecutive primes of the form 4k+1 (see below).

Original entry on oeis.org

1, 2, 2, 2, 2, 10, 8, 10, 8, 4, 2, 10, 4, 20, 18, 10, 2, 20, 58, 8, 40, 2, 40, 20, 10, 90, 2, 20, 10, 116, 2, 8, 20, 10, 2, 10, 20, 26, 4, 146, 8, 34, 10, 40, 34, 40, 2, 20, 2, 160, 50, 10, 180, 2, 180, 90, 58, 40, 130, 16, 116, 194, 50, 136, 74, 34, 52, 40
Offset: 1

Views

Author

Thomas Ordowski, Oct 05 2012

Keywords

Comments

Every prime p of the form 4k+1 has a unique solution p = x^2 + y^2. This sequence gives the squared distance between points (x,y) for consecutive primes of this form.
The squares mutual distance consecutive points with coordinates x(n) = A002331(n) and y(n) = A002330(n), where x(n)^2 + y(n)^2 = A002313(n) is prime.
Theorem: a(n) =/= A082073(n-1) for all n > 1. Generally, it can be shown that there is no pair of primes p = a^2 + b^2 and q = x^2 + y^2 such that (a - x)^2 + (b - y)^2 = |p - q| > 0.

Examples

			5 = 1^2 + 2^2 and 13 = 2^2 + 3^2. The squared distance between the points (1,2) and (2,3) is 2, the second term of this sequence.
		

Crossrefs

Programs

  • Mathematica
    nn = 200; p = Select[Prime[Range[nn]], Mod[#, 4] == 1 &]; q = {1, 1}; Table[pp = PowersRepresentations[p[[i]], 2, 2][[1]]; d = pp - q; q = pp; d[[1]]^2 + d[[2]]^2, {i, Length[p] - 1}] (* T. D. Noe, Oct 19 2012 *)

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

A244290 Smallest prime a(n) = x^2 + y^2 such that c^2 + d^2 = A002313(n) and c*x + d*y = 1, where c,d,x,y are integers.

Original entry on oeis.org

5, 2, 2, 53, 5, 173, 2, 17, 2, 29, 13, 5, 1697, 53, 2, 73, 13, 5, 37, 2, 389, 733, 2753, 89, 17, 1093, 773, 13, 397, 1789, 2, 41, 821, 53, 5, 29, 193, 281, 6257, 173, 2, 149, 593, 701, 5, 1289, 157, 5, 7993, 13, 2213, 449, 877, 2, 61, 37, 389, 17, 5, 24061
Offset: 1

Views

Author

Thomas Ordowski, Jun 27 2014

Keywords

Comments

Let c^2 + d^2 = p be a prime, A002313(n). Then x^2 + y^2 = q is the smallest prime, a(n), such that cx + dy = 1 (Bézout's identity), where c,d,x,y are integers. We have pq = m^2 + 1 at m = cy - dx.
a(n) is the smallest prime q such that q*A002313(n)-1 is a square. - Thomas Ordowski, Sep 13 2015
Conjecture: a(n) < A002313(n)^2 for n > 1. - Thomas Ordowski, Dec 28 2017

Examples

			For prime 2 = 1^2 + 1^2 is 1*2 + 1*(-1) = 1 and 2^2 + (-1)^2 = 5 is prime, so a(1) = 5. For A002313(2) = 5 is vice versa so a(2) = 2.
		

Crossrefs

Programs

  • Maple
    N:= 10^6: # to get all a(n) before the first one > N
    P:= select(isprime, [2,seq(4*i+1, i=1..floor((N-1)/4))]):
    f:= proc(p) local i;
      for i from 1 to nops(P) do
       if issqr(p*P[i]-1) then return P[i] fi
    od:
      -1
    end proc:
    for i from 1 to nops(P) do
      v:= f(P[i]);
    if v = -1 then break fi;
    A[i]:= v;
    od:
    seq(A[j],j=1..i-1); # Robert Israel, Sep 13 2015
  • PARI
    \\ cs should contain terms from A002330
    \\ ds should contain terms from A002331
    a244290(cs, ds) = {
      vector(#cs, i,
        c=cs[i]; d=ds[i]; [u,v]=gcdext(c, d);
        x=u; y=v; while(!isprime(x^2+y^2), x+=d; y-=c); e=x^2+y^2;
        x=u; y=v; while(!isprime(x^2+y^2), x-=d; y+=c); f=x^2+y^2;
        min(e, f)
      )
    } \\ Colin Barker, Jul 06 2014

Extensions

More terms from Colin Barker, Jul 06 2014
Previous Showing 11-20 of 23 results. Next