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-39 of 39 results.

A002340 Numbers x such that p = x^2 - 5y^2, where p == 0, 1, or 4 (mod 5).

Original entry on oeis.org

5, 4, 8, 7, 6, 11, 8, 9, 14, 18, 13, 11, 17, 16, 12, 13, 14, 28, 19, 14, 18, 16, 27, 22, 31, 16, 17, 26, 19, 34, 24, 23, 22, 28, 37, 41, 27, 32, 21, 26, 22, 23, 31, 22, 44, 48, 23, 29, 39, 43, 24, 38, 51, 32, 26, 31, 28, 29, 36, 41, 27, 58, 28
Offset: 1

Views

Author

Keywords

References

  • A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002341.

Extensions

Corrected and extended by Sean A. Irvine, Oct 21 2013
Offset corrected by Mohammed Yaseen, Jul 24 2023

A002341 Numbers y such that p = x^2 - 5y^2, where p = 0, 1, or 4 (mod 5).

Original entry on oeis.org

2, 1, 3, 2, 1, 4, 1, 2, 5, 7, 4, 2, 6, 5, 1, 2, 3, 11, 6, 1, 5, 3, 10, 7, 12, 1, 2, 9, 4, 13, 7, 6, 5, 9, 14, 16, 8, 11, 2, 7, 3, 4, 10, 1, 17, 19, 2, 8, 14, 16, 1, 13, 20, 9, 3, 8, 5, 6, 11, 14
Offset: 1

Views

Author

Keywords

References

  • A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002340.

Extensions

Offset corrected by Mohammed Yaseen, Jul 24 2023

A002342 Least positive integer x such that p = (x^2 - 5*y^2)/4 where p is the n-th odd prime such that 5 is a square mod p.

Original entry on oeis.org

5, 7, 9, 11, 12, 13, 16, 17, 17, 19, 19, 22, 21, 23, 24, 26, 27, 29, 27, 28, 29, 32, 31, 31, 33, 32, 34, 33, 37, 37, 37, 39, 41, 39, 41, 43, 41, 41, 42, 43, 44, 46, 43, 44, 47, 49, 46, 47, 47, 49, 48, 49, 53, 51, 52, 53, 56, 57, 53, 53, 54, 59, 56, 57, 58, 59, 59, 57, 58, 61
Offset: 1

Views

Author

Keywords

Comments

The n-th odd prime for which 5 is a square mod p is A038872(n).

Examples

			5 = (5^2 - 5*1^2)/4 so a(1)=5;
11 = (7^2 - 5*1^2)/4 so a(2)=7.
		

References

  • A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • PARI
    a(n)=local(y,p); if(n<1,0,p=0; y=2; until(p>=n,y++; if(issquare(5+O(prime(y))),p++)); p=prime(y); y=0; until(issquare(4*p+5*y^2),y++); sqrtint(4*p+5*y^2))

A002343 Least positive integer y such that p = (x^2 - 5*y^2)/4 where p is the n-th odd prime such that 5 is a square mod p.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 3, 1, 3, 1, 4, 1, 1, 2, 4, 5, 5, 1, 2, 3, 6, 3, 1, 5, 2, 4, 1, 7, 5, 3, 5, 7, 1, 5, 7, 3, 1, 4, 5, 6, 8, 1, 2, 7, 9, 4, 5, 3, 5, 2, 1, 9, 5, 6, 7, 10, 11, 3, 1, 4, 11, 6, 7, 8, 9, 7, 1, 4, 9, 5, 3, 8, 13, 3, 1, 4, 11, 1, 8, 2, 9, 10, 11, 13, 14, 7, 4, 5, 11, 7, 2, 10, 11, 15, 5, 9
Offset: 1

Views

Author

Keywords

Comments

The n-th odd prime for which 5 is a square mod p is A038872(n).

Examples

			5 = (5^2 - 5*1^2)/4 so a(1)=1;
11 = (7^2 - 5*1^2)/4 so a(2)=1.
		

References

  • A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • PARI
    a(n)=local(y,p); if(n<1,0,p=0; y=1; until(p>=n,y++; if(issquare(5+O(prime(y))),p++)); p=prime(y); y=0; until(issquare(4*p+5*y^2),y++); y)

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

A080680 Integer part of the square root of the n-th prime of the form 4k+1.

Original entry on oeis.org

2, 3, 4, 5, 6, 6, 7, 7, 8, 9, 9, 10, 10, 10, 11, 12, 12, 13, 13, 13, 14, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 22, 22, 23, 23, 23, 24, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 27, 27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 02 2003

Keywords

Comments

a(n)^2 < A002330(n+2)^2 + A002331(n+2)^2 < a(n+1)^2.

Programs

  • Mathematica
    Floor[Sqrt[#]]&/@Select[Prime[Range[300]],Mod[#,4]==1&] (* Harvey P. Dale, Jun 04 2023 *)

Formula

a(n) = A000196(A002144(n)).

A107961 Pythagorean semiprimes: products of two Pythagorean primes (A002313).

Original entry on oeis.org

4, 10, 25, 26, 34, 58, 65, 74, 82, 85, 106, 122, 145, 146, 169, 178, 185, 194, 202, 205, 218, 221, 226, 265, 274, 289, 298, 305, 314, 346, 362, 365, 377, 386, 394, 445, 458, 466, 481, 482, 485, 493, 505, 514, 533, 538, 545, 554, 562, 565, 586, 626, 629, 634
Offset: 1

Views

Author

Jonathan Vos Post, Jun 12 2005

Keywords

Comments

Fermat's 4n+1 theorem, sometimes called Fermat's two-square theorem or simply "Fermat's theorem," states that a prime number p can be represented in an essentially unique manner (up to the order of addends) in the form x^2 + y^2 for integer x and y iff p = 1 (mod 4) or p = 2 (which is a degenerate case with x = y = 1). The theorem was stated by Fermat, but the first published proof was by Euler.

References

  • Conway, J. H. and Guy, R. K. The Book of Numbers. New York: Springer-Verlag, pp. 146-147 and 220-223, 1996.
  • Hardy, G. H. and Wright, E. M. An Introduction to the Theory of Numbers, 5th ed. Oxford, England: Clarendon Press, pp. 13 and 219, 1979.
  • Seroul, R. "Prime Number and Sum of Two Squares." Section 2.11 in Programming for Mathematicians. Berlin: Springer-Verlag, pp. 18-19, 2000.

Crossrefs

Formula

{a(n)} = {p*q: p and q both elements of A002313} = {p*q: p and q both of form m^2 + n^2 for integers m, n}.

A383176 If p = A002313(n) is a prime such that p = x^2 + y^2, then a(n) is the largest integer k that satisfies x^2 + y^2 - k*x*y > 0.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 3, 2, 3, 2, 2, 10, 3, 2, 3, 2, 2, 6, 2, 2, 14, 7, 2, 4, 16, 2, 2, 3, 8, 2, 2, 2, 3, 2, 2, 2, 3, 20, 6, 2, 2, 3, 5, 2, 4, 2, 2, 2, 2, 24, 3, 5, 2, 2, 6, 2, 4, 2, 26, 5, 2, 13, 3, 2, 2, 2, 2, 5, 2, 3, 2, 7, 5, 2, 2, 2, 3, 2, 7, 5, 2, 2, 3
Offset: 1

Views

Author

Gonzalo Martínez, Apr 18 2025

Keywords

Comments

Fermat's Christmas theorem states that if p = 2 or if p is congruent to 1 modulo 4 (A002313), then p is written as a sum of 2 squares uniquely. Thus, if A002313(n) = x^2 + y^2, for certain integers x and y, then a(n) is the largest integer k such that x^2 + y^2 - k*x*y > 0.
a(n) >= 2, for n > 1. If p > 2 and p = x^2 + y^2, since x != y, then it is satisfied that 0 < (x - y)^2 = x^2 + y^2 - 2x*y < x^2 + y^2 - x*y. The equality a(n) = 2 is given when |x - y| < phi*min{x, y}.

Examples

			Since A002313(8) = 53 and 53 = 2^2 + 7^2, we have that 53 - 3*2*7 > 0 and 53 - 4*2*7 < 0, then a(8) = 3.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime
    from sympy.solvers.diophantine.diophantine import cornacchia
    def A383176_gen(): # generator of terms
        yield 1
        for p in count(5,4):
            if isprime(p):
                for x,y in cornacchia(1,1,p):
                    yield p//(x*y)
    A383176_list = list(islice(A383176_gen(),30)) # Chai Wah Wu, Apr 26 2025

Extensions

Definition clarified by Chai Wah Wu, Apr 26 2025
Previous Showing 31-39 of 39 results.