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.

Showing 1-10 of 39 results. Next

A145046 a(n) = 2*A002330(n+1) * A002331(n+1).

Original entry on oeis.org

4, 12, 8, 20, 12, 40, 28, 60, 48, 80, 72, 20, 60, 112, 88, 140, 132, 52, 180, 168, 28, 60, 208, 120, 32, 260, 252, 160, 68, 312, 308, 288, 180, 272, 252, 340, 228, 40, 120, 420, 408, 280, 168, 380, 220, 440, 420, 532, 520, 48, 368, 240, 612, 608, 200, 572, 300, 552, 52, 260
Offset: 0

Views

Author

N. J. A. Sloane, Feb 25 2009

Keywords

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

4 times A070151, or (apart from initial term) twice A145019.
Cf. A070079.

A145019 A002330(n)*A002331(n).

Original entry on oeis.org

1, 2, 6, 4, 10, 6, 20, 14, 30, 24, 40, 36, 10, 30, 56, 44, 70, 66, 26, 90, 84, 14, 30, 104, 60, 16, 130, 126, 80, 34, 156, 154, 144, 90, 136, 126, 170, 114, 20, 60, 210, 204, 140, 84, 190, 110, 220, 210, 266, 260, 24, 184, 120, 306, 304, 100, 286, 150, 276, 26, 130, 330, 54, 234
Offset: 0

Views

Author

N. J. A. Sloane, Feb 25 2009

Keywords

Crossrefs

Apart from initial term, twice A070151, or half A145046.

A002144 Pythagorean primes: primes of the form 4*k + 1.

Original entry on oeis.org

5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313, 317, 337, 349, 353, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 509, 521, 541, 557, 569, 577, 593, 601, 613, 617
Offset: 1

Views

Author

Keywords

Comments

Rational primes that decompose in the field Q(sqrt(-1)). - N. J. A. Sloane, Dec 25 2017
These are the prime terms of A009003.
-1 is a quadratic residue mod a prime p if and only if p is in this sequence.
Sin(a(n)*Pi/2) = 1 with Pi = 3.1415..., see A070750. - Reinhard Zumkeller, May 04 2002
If at least one of the odd primes p, q belongs to the sequence, then either both or neither of the congruences x^2 = p (mod q), x^2 = q (mod p) are solvable, according to Gauss reciprocity law. - Lekraj Beedassy, Jul 17 2003
Odd primes such that binomial(p-1, (p-1)/2) == 1 (mod p). - Benoit Cloitre, Feb 07 2004
Primes that are the hypotenuse of a right triangle with integer sides. The Pythagorean triple is {A002365(n), A002366(n), a(n)}.
Also, primes of the form a^k + b^k, k > 1. - Amarnath Murthy, Nov 17 2003
The square of a(n) is the average of two other squares. This fact gives rise to a class of monic polynomials x^2 + bx + c with b = a(n) that will factor over the integers regardless of the sign of c. See A114200. - Owen Mertens (owenmertens(AT)missouristate.edu), Nov 16 2005
Also such primes p that the last digit is always 1 for the Nexus numbers of form n^p - (n-1)^p. - Alexander Adamchuk, Aug 10 2006
The set of Pythagorean primes is a proper subset of the set of positive fundamental discriminants (A003658). - Paul Muljadi, Mar 28 2008
A079260(a(n)) = 1; complement of A137409. - Reinhard Zumkeller, Oct 11 2008
From Artur Jasinski, Dec 10 2008: (Start)
If we take 4 numbers: 1, A002314(n), A152676(n), A152680(n) then multiplication table modulo a(n) is isomorphic to the Latin square:
1 2 3 4
2 4 1 3
3 1 4 2
4 3 2 1
and isomorphic to the multiplication table of {1, i, -i, -1} where i is sqrt(-1), A152680(n) is isomorphic to -1, A002314(n) with i or -i and A152676(n) vice versa -i or i. 1, A002314(n), A152676(n), A152680(n) are subfield of Galois field [a(n)]. (End)
Primes p such that the arithmetic mean of divisors of p^3 is an integer. There are 2 sequences of such primes: this one and A002145. - Ctibor O. Zizka, Oct 20 2009
Equivalently, the primes p for which the smallest extension of F_p containing the square roots of unity (necessarily F_p) contains the 4th roots of unity. In this respect, the n = 2 case of a family of sequences: see n=3 (A129805) and n=5 (A172469). - Katherine E. Stange, Feb 03 2010
Subsequence of A007969. - Reinhard Zumkeller, Jun 18 2011
A151763(a(n)) = 1.
k^k - 1 is divisible by 4*k + 1 if 4*k + 1 is a prime (see Dickson reference). - Gary Detlefs, May 22 2013
Not only are the squares of these primes the sum of two nonzero squares, but the primes themselves are also. 2 is the only prime equal to the sum of two nonzero squares and whose square is not. 2 is therefore not a Pythagorean prime. - Jean-Christophe Hervé, Nov 10 2013
The statement that these primes are the sum of two nonzero squares follows from Fermat's theorem on the sum of two squares. - Jerzy R Borysowicz, Jan 02 2019
The decompositions of the prime and its square into two nonzero squares are unique. - Jean-Christophe Hervé, Nov 11 2013. See the Dickson reference, Vol. II, (B) on p. 227. - Wolfdieter Lang, Jan 13 2015
p^e for p prime of the form 4*k+1 and e >= 1 is the sum of 2 nonzero squares. - Jon Perry, Nov 23 2014
Primes p such that the area of the isosceles triangle of sides (p, p, q) for some integer q is an integer. - Michel Lagneau, Dec 31 2014
This is the set of all primes that are the average of two squares. - Richard R. Forberg, Mar 01 2015
Numbers k such that ((k-3)!!)^2 == -1 (mod k). - Thomas Ordowski, Jul 28 2016
This is a subsequence of primes of A004431 and also of A016813. - Bernard Schott, Apr 30 2022
In addition to the comment from Jean-Christophe Hervé, Nov 10 2013: All powers as well as the products of any of these primes are the sum of two nonzero squares. They are terms of A001481, which is closed under multiplication. - Klaus Purath, Nov 19 2023

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
  ...
a(7) = 53 = A002972(7)^2 + (2*A002973(7))^2 = 7^2 + (2*1)^2 = 49 + 4, and this is the only way. - _Wolfdieter Lang_, Jan 13 2015
		

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.
  • L. E. Dickson, "History of the Theory of Numbers", Chelsea Publishing Company, 1919, Vol I, page 386
  • L. E. Dickson, History of the Theory of Numbers, Carnegie Institution, Publ. No. 256, Vol. II, Washington D.C., 1920, p. 227.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 132.
  • M. du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; see p. 76.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 241, 243.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 90.

Crossrefs

Cf. A004613 (multiplicative closure).
Apart from initial term, same as A002313.
For values of n see A005098.
Primes in A020668.

Programs

  • Haskell
    a002144 n = a002144_list !! (n-1)
    a002144_list = filter ((== 1) . a010051) [1,5..]
    -- Reinhard Zumkeller, Mar 06 2012, Feb 22 2011
    
  • Magma
    [a: n in [0..200] | IsPrime(a) where a is 4*n + 1 ]; // Vincenzo Librandi, Nov 23 2014
    
  • Maple
    a := []; for n from 1 to 500 do if isprime(4*n+1) then a := [op(a),4*n+1]; fi; od: A002144 := n->a[n];
    # alternative
    A002144 := proc(n)
        option remember ;
        local a;
        if n = 1 then
            5;
        else
            for a from procname(n-1)+4 by 4 do
                if isprime(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A002144(n),n=1..100) ; # R. J. Mathar, Jan 31 2024
  • Mathematica
    Select[4*Range[140] + 1, PrimeQ[ # ] &] (* Stefan Steinerberger, Apr 16 2006 *)
    Select[Prime[Range[150]],Mod[#,4]==1&] (* Harvey P. Dale, Jan 28 2021 *)
  • PARI
    select(p->p%4==1,primes(1000))
    
  • PARI
    A002144_next(p=A2144[#A2144])={until(isprime(p+=4),);p} /* NB: p must be of the form 4k+1. Beyond primelimit, this is *much* faster than forprime(p=...,, p%4==1 && return(p)). */
    A2144=List(5); A002144(n)={while(#A2144A002144_next())); A2144[n]}
    \\ M. F. Hasler, Jul 06 2024
    
  • Python
    from sympy import prime
    A002144 = [n for n in (prime(x) for x in range(1,10**3)) if not (n-1) % 4]
    # Chai Wah Wu, Sep 01 2014
    
  • Python
    from sympy import isprime
    print(list(filter(isprime, range(1, 618, 4)))) # Michael S. Branicky, May 13 2021
    
  • SageMath
    def A002144_list(n): # returns all Pythagorean primes <= n
        return [x for x in prime_range(5,n+1) if x % 4 == 1]
    A002144_list(617) # Peter Luschny, Sep 12 2012

Formula

Odd primes of form x^2 + y^2, (x=A002331, y=A002330, with x < y) or of form u^2 + 4*v^2, (u = A002972, v = A002973, with u odd). - Lekraj Beedassy, Jul 16 2004
p^2 - 1 = 12*Sum_{i = 0..floor(p/4)} floor(sqrt(i*p)) where p = a(n) = 4*n + 1. [Shirali]
a(n) = A000290(A002972(n)) + A000290(2*A002973(n)) = A000290(A002331(n+1)) + A000290(A002330(n+1)). - Reinhard Zumkeller, Feb 16 2010
a(n) = A002972(n)^2 + (2*A002973(n))^2, n >= 1. See the Jean-Christophe Hervé Nov 11 2013 comment. - Wolfdieter Lang, Jan 13 2015
a(n) = 4*A005098(n) + 1. - Zak Seidov, Sep 16 2018
From Vaclav Kotesovec, Apr 30 2020: (Start)
Product_{k>=1} (1 - 1/a(k)^2) = A088539.
Product_{k>=1} (1 + 1/a(k)^2) = A243380.
Product_{k>=1} (1 - 1/a(k)^3) = A334425.
Product_{k>=1} (1 + 1/a(k)^3) = A334424.
Product_{k>=1} (1 - 1/a(k)^4) = A334446.
Product_{k>=1} (1 + 1/a(k)^4) = A334445.
Product_{k>=1} (1 - 1/a(k)^5) = A334450.
Product_{k>=1} (1 + 1/a(k)^5) = A334449. (End)
From Vaclav Kotesovec, May 05 2020: (Start)
Product_{k>=1} (1 + 1/A002145(k)) / (1 + 1/a(k)) = Pi/(4*A064533^2) = 1.3447728438248695625516649942427635670667319092323632111110962...
Product_{k>=1} (1 - 1/A002145(k)) / (1 - 1/a(k)) = Pi/(8*A064533^2) = 0.6723864219124347812758324971213817835333659546161816055555481... (End)
Sum_{k >= 1} 1/a(k)^s = (1/2) * Sum_{n >= 1 odd numbers} moebius(n) * log((2*n*s)! * zeta(n*s) * abs(EulerE(n*s - 1)) / (Pi^(n*s) * 2^(2*n*s) * BernoulliB(2*n*s) * (2^(n*s) + 1) * (n*s - 1)!))/n, s >= 3 odd number. - Dimitris Valianatos, May 21 2020
Legendre symbol (-1, a(n)) = +1, for n >= 1. - Wolfdieter Lang, Mar 03 2021

A002313 Primes congruent to 1 or 2 modulo 4; or, primes of form x^2 + y^2; or, -1 is a square mod p.

Original entry on oeis.org

2, 5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313, 317, 337, 349, 353, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 509, 521, 541, 557, 569, 577, 593, 601, 613, 617
Offset: 1

Views

Author

Keywords

Comments

Or, primes p such that x^2 - p*y^2 represents -1.
Primes which are not Gaussian primes (meaning not congruent to 3 mod 4).
Every Fibonacci prime (with the exception of F(4) = 3) is in the sequence. If p = 2n+1 is the prime index of the Fibonacci prime, then F(2n+1) = F(n)^2 + F(n+1)^2 is the unique representation of the prime as sum of two squares. - Sven Simon, Nov 30 2003
Except for 2, primes of the form x^2 + 4y^2. See A140633. - T. D. Noe, May 19 2008
Primes p such that for all p > 2, p XOR 2 = p + 2. - Brad Clardy, Oct 25 2011
Greatest prime divisor of r^2 + 1 for some r. - Michel Lagneau, Sep 30 2012
Empirical result: a(n), as a set, compose the prime factors of the family of sequences produced by A005408(j)^2 + A005408(j+k)^2 = (2j+1)^2 + (2j+2k+1)^2, for j >= 0, and a given k >= 1 for each sequence, with the addition of the prime factors of k if not already in a(n). - Richard R. Forberg, Feb 09 2015
Primes such that when r is a primitive root then p-r is also a primitive root. - Emmanuel Vantieghem, Aug 13 2015
Primes of the form (x^2 + y^2)/2. Note that (x^2 + y^2)/2 = ((x+y)/2)^2 + ((x-y)/2)^2 = a^2 + b^2 with x = a + b and y = a - b. More generally, primes of the form (x^2 + y^2) / A001481(n) for every fixed n > 1. - Thomas Ordowski, Jul 03 2016
Numbers n such that ((n-2)!!)^2 == -1 (mod n). - Thomas Ordowski, Jul 25 2016
Primes p such that (p-1)!! == (p-2)!! (mod p). - Thomas Ordowski, Jul 28 2016
The product of 2 different terms (x^2 + y^2)(z^2 + v^2) = (xz + yv)^2 + (xv - yz)^2 is sum of 2 squares (A000404) because (xv - yz)^2 > 0. If x were equal to yz/v then (x^2 + y^2)/(z^2 + v^2) would be equal to ((yz/v)^2 + y^2)/(z^2 + v^2) = y^2/v^2 which is not possible because (x^2 + y^2) and (z^2 + v^2) are prime numbers. For example, (2^2 + 5^2)(4^2 + 9^2) = (2*4 + 5*9)^2 + (2*9 - 5*4)^2. - Jerzy R Borysowicz, Mar 21 2017

Examples

			13 is in the sequence since it is prime and 13 = 4*3 + 1.  Also 13 = 2^2 + 3^2.  And -1 is a square (mod 13): -1 + 2*13 = 25 = 5^2.  Of course, only the first term is congruent to 2 (mod 4). - _Michael B. Porter_, Jul 04 2016
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 872.
  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, p. 219, th. 251, 252.
  • 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

Apart from initial term, same as A002144. For values of x and y see A002330 and A002331.

Programs

  • Haskell
    a002313 n = a002313_list !! (n-1)
    a002313_list = filter ((`elem` [1,2]) . (`mod` 4)) a000040_list
    -- Reinhard Zumkeller, Feb 04 2014
    
  • Magma
    [p: p in PrimesUpTo(700) | p mod 4 in {1,2}]; // Vincenzo Librandi, Feb 18 2015
  • Maple
    with(numtheory): for n from 1 to 300 do if ithprime(n) mod 4 = 1 or ithprime(n) mod 4 = 2 then printf(`%d,`,ithprime(n)) fi; od:
    # alternative
    A002313 := proc(n)
        option remember ;
        local a;
        if n = 1 then
            2;
        elif n = 2 then
            5;
        else
            for a from procname(n-1)+4 by 4 do
                if isprime(a) then
                    return a ;
                end if;
            end do:
        end if;
    end proc:
    seq(A002313(n),n=1..100) ; # R. J. Mathar, Feb 01 2024
  • Mathematica
    Select[ Prime@ Range@ 115, Mod[#, 4] != 3 &] (* Robert G. Wilson v *)
    fQ[n_] := Solve[x^2 + 1 == n*y^2, {x, y}, Integers] == {}; Select[ Prime@ Range@ 115, fQ] (* Robert G. Wilson v, Dec 19 2013 *)
  • PARI
    select(p->p%4!=3, primes(1000)) \\ Charles R Greathouse IV, Feb 11 2011
    

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, Jul 04 2016
a(n) = A002331(n)^2 + A002330(n)^2. See crossrefs. - Wolfdieter Lang, Dec 11 2016

Extensions

More terms from Henry Bottomley, Aug 10 2000
More terms from James Sellers, Aug 22 2000

A002331 Values of x in the solution to p = x^2 + y^2, x <= y, with prime p = A002313(n).

Original entry on oeis.org

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

Views

Author

Keywords

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
.................................
		

References

  • A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
  • 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. A002330, A002313, A002144, A027862 (locates y=x+1).

Programs

  • Maple
    See A002330 for Maple program.
    # alternative
    A002331 := proc(n)
        A363051(A002313(n)) ;
    end proc:
    seq(A002331(n),n=1..100) ; # R. J. Mathar, Feb 01 2024
  • Mathematica
    pmax = 1000; x[p_] := Module[{x, y}, x /. ToRules[Reduce[0 <= x <= y && x^2 + y^2 == p, {x, y}, Integers]]]; For[n=1; p=2, pJean-François Alcover, Feb 26 2016 *)
  • PARI
    f(p)=my(s=lift(sqrt(Mod(-1,p))),x=p,t);if(s>p/2,s=p-s); while(s^2>p,t=s;s=x%s;x=t);s
    forprime(p=2,1e3,if(p%4-3,print1(sqrtint(p-f(p)^2)", ")))
    \\ Charles R Greathouse IV, Apr 24 2012
    
  • PARI
    do(p)=qfbsolve(Qfb(1,0,1),p)[2]
    forprime(p=2,1e3,if(p%4-3,print1(do(p)", "))) \\ Charles R Greathouse IV, Sep 26 2013

Formula

a(n) = A096029(n) - A096030(n) for n > 1. - Lekraj Beedassy, Jul 16 2004
a(n+1) = Min(A002972(n), 2*A002973(n)). - Reinhard Zumkeller, Feb 16 2010
a(n) = A363051(A002313(n)). - R. J. Mathar, Jan 31 2024

A002365 Numbers y such that p^2 = x^2 + y^2, 0 < x < y, p = A002144(n).

Original entry on oeis.org

4, 12, 15, 21, 35, 40, 45, 60, 55, 80, 72, 99, 91, 112, 105, 140, 132, 165, 180, 168, 195, 221, 208, 209, 255, 260, 252, 231, 285, 312, 308, 288, 299, 272, 275, 340, 325, 399, 391, 420, 408, 351, 425, 380, 459, 440, 420, 532, 520, 575, 465, 551, 612, 608, 609
Offset: 1

Views

Author

Keywords

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
.................................
3^2 + 4^2 = 5^2, giving x=3, y=4, p=5 and we have the first terms of A002366, the present sequence and A002144.
		

References

  • A. J. C. Cunningham, Quadratic and Linear Tables. Hodgson, London, 1927, pp. 77-79.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 60.
  • 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

Extensions

More terms from Ray Chandler, Jun 23 2004
Revised definition from M. F. Hasler, Feb 24 2009

A002972 a(n) is the odd member of {x,y}, where x^2 + y^2 is the n-th prime of the form 4i+1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

It appears that the terms in this sequence are the absolute values of the terms in A046730. - Gerry Myerson, Dec 02 2010
"the n-th prime of the form 4i+1" is A005098(n). - Rainer Rosenthal, Aug 24 2022

Examples

			The 2nd prime of the form 4i+1 is 13 = 2^2 + 3^2, so a(2)=3.
		

References

  • E. Kogbetliantz and A. Krikorian, Handbook of First Complex Prime Numbers, Gordon and Breach, NY, 1971, p. 243.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    pmax = 1000; odd[p_] := Module[{k, m}, 2m+1 /. ToRules[Reduce[k>0 && m >= 0 && (2k)^2 + (2m+1)^2 == p, {k, m}, Integers]]]; For[n=1; p=5, pJean-François Alcover, Feb 26 2016 *)
  • PARI
    decomp2sq(p) = {my (m=(p-1)/4, r, x, limit=ceil(sqrt(p))); if (p>4 && denominator(m)==1, forprime (c=2,oo, if (!issquare(Mod(c,p)), r=c; break)); x=lift (Mod(r,p)^m); until (px%2,decomp2sq(p))[1],", "))) \\ Hugo Pfoertner, Aug 27 2022

Formula

a(n) = Min(A173330(n), A002144(n) - A173330(n)). - Reinhard Zumkeller, Feb 16 2010
a(n)^2 + 4*A002973(n)^2 = A002144(n); A002331(n+1) = Min(a(n),2*A002973(n)) and A002330(n+1) = Max(a(n),2*A002973(n)). - Reinhard Zumkeller, Feb 16 2010
(a(n) - 1)/2 = A208295(n), n >= 1. - Wolfdieter Lang, Mar 03 2012
a(A267858(k)) == 1 (mod 4), k >= 1. - Wolfdieter Lang, Feb 18 2016

Extensions

Better description from Jud McCranie, Mar 05 2003

A002366 Numbers x such that x^2 + y^2 = p^2 = A002144(n)^2, x < y.

Original entry on oeis.org

3, 5, 8, 20, 12, 9, 28, 11, 48, 39, 65, 20, 60, 15, 88, 51, 85, 52, 19, 95, 28, 60, 105, 120, 32, 69, 115, 160, 68, 25, 75, 175, 180, 225, 252, 189, 228, 40, 120, 29, 145, 280, 168, 261, 220, 279, 341, 165, 231, 48, 368, 240, 35, 105, 200, 315, 300, 385, 52, 260, 259
Offset: 1

Views

Author

Keywords

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
.................................
		

References

  • A. J. C. Cunningham, Quadratic and Linear Tables. Hodgson, London, 1927, pp. 77-79.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 60.
  • 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

Extensions

More terms from Ray Chandler, Jun 23 2004
Corrected definition to require p=A002144(n), which defines the order of the terms. - M. F. Hasler, Feb 24 2009

A002973 a(n) is half of the even member of {x,y}, where x^2 + y^2 is the n-th prime of the form 4i+1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) is odd iff x^2 + y^2 == 5 (mod 8). [Vladimir Shevelev, Jul 12 2009]
A002972(n)^2 + 4*a(n)^2 = A002144(n); A002331(n+1) = Min(A002972(n),2*a(n)) and A002330(n+1) = Max(A002972(n),2*a(n)). [Reinhard Zumkeller, Feb 16 2010]

Examples

			The 3rd prime of the form 4i+1 is 17 = 1^2 + 4^2, so a(3) = 4/2 = 2.
		

References

  • E. Kogbetliantz and A. Krikorian, Handbook of First Complex Prime Numbers, Gordon and Breach, NY, 1971, p. 243.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    pmax = 1000; k[p_] := Module[{k, m}, k /. ToRules[Reduce[k>0 && m >= 0 && (2k)^2 + (2m+1)^2 == p, {k, m}, Integers]]]; For[n=1; p=5, pJean-François Alcover, Feb 26 2016 *)
  • PARI
    \\ use function decomp2sq from A002972
    forprime (p=5, 1000, if (p%4==1, print1(select(x->!(x%2),decomp2sq(p))[1]/2,", "))) \\ Hugo Pfoertner, Aug 27 2022

Formula

a(n) = Min(A173331(n), A002144(n) - A173331(n)) / 2. [Reinhard Zumkeller, Feb 16 2010]

Extensions

Better description from Jud McCranie, Mar 05 2003

A070151 a(n) is one fourth of the even leg of the unique primitive Pythagorean triangle with hypotenuse A002144(n).

Original entry on oeis.org

1, 3, 2, 5, 3, 10, 7, 15, 12, 20, 18, 5, 15, 28, 22, 35, 33, 13, 45, 42, 7, 15, 52, 30, 8, 65, 63, 40, 17, 78, 77, 72, 45, 68, 63, 85, 57, 10, 30, 105, 102, 70, 42, 95, 55, 110, 105, 133, 130, 12, 92, 60, 153, 152, 50, 143, 75, 138, 13, 65, 165, 27, 117, 190, 150, 187, 143, 70
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 x*y/2.

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
.................................
n = 7: a(7) = 7, A002144(7) = 53 and 53^2 = 2809 = A070079(7)^2 + (4*a(7))^2 = 45^2 + (4*7)^2 = 2025 + 784. - _Wolfdieter Lang_, Jan 13 2015
		

Crossrefs

Formula

a(n) = A002330(n+1)*A002331(n+1)/2. - David Wasserman, May 12 2003
4*a(n) is the even positive integer with A080109(n) = A002144(n)^2 = A070079(n)^2 + (4*a(n))^2 in this unique decomposition (up to order). See A080109 for references. - Wolfdieter Lang, Jan 13 2015

Extensions

Edited. New name, moved the old one to the comment section. - Wolfdieter Lang, Jan 13 2015
Showing 1-10 of 39 results. Next