Search: a002972 -id:a002972
|
|
A279392
|
|
Bisection of primes congruent to 1 modulo 4 (A002144), depending on the corresponding sum of the A002972 and 2*A002973 entries being congruent to 1 modulo 4 or not. Here we give the first case.
|
|
+20
2
|
|
|
13, 17, 41, 53, 89, 97, 109, 149, 157, 229, 233, 257, 281, 313, 317, 337, 353, 373, 397, 401, 421, 433, 457, 461, 557, 569, 577, 601, 641, 709, 733, 769, 797, 809
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The primes from A002144 (1 (mod 4) primes) have the property A002144(n) = A002972(n)^2 + (2*A002973(n))^2 = A(n)^2 + B(n)^2 with odd A(n) and even B(n). A bisection of A002144 is given depending on A(n) + B(n) == 1 (mod 4) (part I) or A(n) + B(n) == 3 (mod 4) (part II). The present sequence gives part I of this bisection. The other part II is given in A279393.
This bisection appears in the formula for the p-defects of the congruence y^2 == x^3 + 4*x (mod p) for primes p == 1 (mod 4). See A278720 where for nonvanishing entries the sign is conjectured to be + for these part I primes, and it is - for the part II primes from A279393.
|
|
LINKS
|
|
|
FORMULA
|
A prime A002144(m) = A(m)^2 + B(m)^2 belongs to this sequence iff (-1)^((A(m)-1)/2 + B(m)/2) = +1, where A(m) = A002972(m) and B(m)/2 = A002973(m).
|
|
EXAMPLE
|
a(1) = 13 is the first prime from A002144 which has A + B = 1 (mod 4) because 13 = A002144(2) = A(2)^2 + B(2)^2 = 3^2 + (2*1)^2, and 3 + 2 = 5 == 1 (mod 4), and A002144(1) = 5 leads to A + B = 3 (mod 4), because 5 = 1^2 + (2*1)^2.
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A279393
|
|
Bisection of primes congruent to 1 modulo 4 (A002144), depending on the corresponding sum of the A002972 and 2*A002973 entries being congruent to 1 modulo 4 or not. Here we give the second case.
|
|
+20
2
|
|
|
5, 29, 37, 61, 73, 101, 113, 137, 173, 181, 193, 197, 241, 269, 277, 293, 349, 389, 409, 449, 509, 521, 541, 593, 613, 617, 653, 661, 673, 677, 701, 757, 761, 773, 821
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
See A279392 for details of this bisection of the primes of A002144. This sequence gives the part II of primes congruent 1 modulo 4.
|
|
LINKS
|
|
|
FORMULA
|
A prime A002144(m) = A(m)^2 + B(m)^2 belongs to this sequence iff (-1)^((A(m)-1)/2 + B(m)/2) = -1, where A(m) = A002972(m) and B(m)/2 = A002973(m).
|
|
EXAMPLE
|
a(1) = 5 = A002144(1) and A002972(1) = 1 and 2*A002973(1) = 2, hence 1 + 2 = 3 == 3 (mod 4), and 5 belongs to part II of this bisection.
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A267858
|
|
Positions of entries of A002972 that are congruent to 1 modulo 4.
|
|
+20
1
|
|
|
1, 3, 4, 5, 6, 8, 10, 11, 12, 18, 19, 21, 23, 25, 26, 27, 28, 29, 30, 32, 33, 34, 36, 38, 41, 43, 45, 47, 49, 50, 52, 53, 55, 56, 57, 59, 60, 63, 65, 66, 68, 69, 72, 73, 74, 77, 78, 85, 87, 88, 89, 90, 91, 93, 94, 95, 96, 100, 104, 105, 106, 108, 110, 112, 115, 119, 120, 122, 127, 128, 131
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
This sequence is needed for the number of solutions modulo primes congruent to 1 modulo 4 of the elliptic curve y^2 = x^3 + x See A095978.
If a positive integer m is not in this sequence then A002972(m) == 3 (mod 4).
|
|
LINKS
|
|
|
FORMULA
|
A002972(a(n)) == 1 (mod 4), n >= 1.
|
|
EXAMPLE
|
n=1: A002972(1) = 1 == 1 (mod 4). But because m = 2 is not in this sequence A002972(2) = 3 == 3 (mod 4).
|
|
MATHEMATICA
|
pmax = 2000; odd[p_] := Module[{k, m}, 2m+1 /. ToRules[Reduce[k>0 && m >= 0 && (2k)^2 + (2m+1)^2 == p, {k, m}, Integers]]]; Reap[For[n=1; p=5, p < pmax, p = NextPrime[p], If[Mod[p, 4]==1, If[Mod[odd[p], 4]==1, Sow[n]]; n++]]][[2, 1]] (* Jean-François Alcover, Feb 26 2016 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A002144
|
|
Pythagorean primes: primes of the form 4*k + 1.
(Formerly M3823 N1566)
|
|
+10
482
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
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.
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)}.
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
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
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
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
|
|
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.
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).
|
|
LINKS
|
|
|
FORMULA
|
p^2 - 1 = 12*Sum_{i = 0..floor(p/4)} floor(sqrt(i*p)) where p = a(n) = 4*n + 1. [Shirali]
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)
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
|
|
EXAMPLE
|
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;
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
...
|
|
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
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:
|
|
MATHEMATICA
|
Select[Prime[Range[150]], Mod[#, 4]==1&] (* Harvey P. Dale, Jan 28 2021 *)
|
|
PROG
|
(Haskell)
a002144 n = a002144_list !! (n-1)
a002144_list = filter ((== 1) . a010051) [1, 5..]
(Magma) [a: n in [0..200] | IsPrime(a) where a is 4*n + 1 ]; // Vincenzo Librandi, Nov 23 2014
(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(#A2144<n, listput(A2144, A002144_next())); A2144[n]}
(Python)
from sympy import prime
A002144 = [n for n in (prime(x) for x in range(1, 10**3)) if not (n-1) % 4]
(Python)
from sympy import isprime
(SageMath)
def A002144_list(n): # returns all Pythagorean primes <= n
return [x for x in prime_range(5, n+1) if x % 4 == 1]
|
|
CROSSREFS
|
Cf. A002145, A002314, A002476, A002972, A002973, A003658, A004431, A007519, A010051, A016813, A076339, A094407.
Cf. A004613 (multiplicative closure).
Apart from initial term, same as A002313.
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A005098
|
|
Numbers k such that 4k + 1 is prime.
|
|
+10
40
|
|
|
1, 3, 4, 7, 9, 10, 13, 15, 18, 22, 24, 25, 27, 28, 34, 37, 39, 43, 45, 48, 49, 57, 58, 60, 64, 67, 69, 70, 73, 78, 79, 84, 87, 88, 93, 97, 99, 100, 102, 105, 108, 112, 114, 115, 127, 130, 135, 139, 142, 144, 148, 150, 153, 154, 160, 163, 165, 168, 169, 175, 177, 183
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
For every k in the sequence, there is exactly 1 square number that can be subtracted to leave a pronic (A002378). E.g., 27 - 25 = 2, 99 - 9 = 90. - Jon Perry, Nov 06 2010
a(k) appears in the o.g.f. for floor(A002144(k)*j^2/4), j >= 0, for k >= 1: x*(a(k)*(1 + x^2) + b(k)*x)/((1 - x)^3*(1 + x)), together with b(k) = (A002144(k) + 1)/2 = A119681(k). - Wolfdieter Lang, Aug 07 2013
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
a := []; for k from 1 to 500 do if isprime(4*k+1) then a := [op(a), k]; fi; od: A005098 := k->a[k];
|
|
MATHEMATICA
|
Select[Range[200], PrimeQ[4# + 1] &] (* Harvey P. Dale, Apr 20 2011 *)
|
|
PROG
|
(Haskell)
a005098 = (`div` 4) . (subtract 1) . a002144
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,nice,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A002330
|
|
Value of y in the solution to p = x^2 + y^2, x <= y, with prime p = A002313(n).
(Formerly M0462 N0169)
|
|
+10
39
|
|
|
1, 2, 3, 4, 5, 6, 5, 7, 6, 8, 8, 9, 10, 10, 8, 11, 10, 11, 13, 10, 12, 14, 15, 13, 15, 16, 13, 14, 16, 17, 13, 14, 16, 18, 17, 18, 17, 19, 20, 20, 15, 17, 20, 21, 19, 22, 20, 21, 19, 20, 24, 23, 24, 18, 19, 25, 22, 25, 23, 26, 26, 22, 27, 26, 20, 25, 22, 26, 28, 25
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
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).
|
|
LINKS
|
A. J. C. Cunningham, Quadratic Partitions, Hodgson, London, 1904. [Annotated scans of selected pages]
|
|
FORMULA
|
|
|
EXAMPLE
|
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;
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
.................................
|
|
MAPLE
|
a := []; for x from 0 to 50 do for y from x to 50 do p := x^2+y^2; if isprime(p) then a := [op(a), [p, x, y]]; fi; od: od: writeto(trans); for i from 1 to 158 do lprint(a[i]); od: # then sort the triples in "trans"
|
|
MATHEMATICA
|
Flatten[#, 1]&[Table[PowersRepresentations[Prime[k], 2, 2], {k, 1, 142}]][[All, 2]] (* Jean-François Alcover, Jul 05 2011 *)
|
|
PROG
|
(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
(PARI) do(p)=qfbsolve(Qfb(1, 0, 1), p)[1]
(PARI) print1(1); forprimestep(p=5, 1e3, 4, print1(", "qfbcornacchia(1, p)[1])) \\ Charles R Greathouse IV, Sep 15 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A002331
|
|
Values of x in the solution to p = x^2 + y^2, x <= y, with prime p = A002313(n).
(Formerly M0096 N0033)
|
|
+10
23
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
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).
|
|
LINKS
|
A. J. C. Cunningham, Quadratic Partitions, Hodgson, London, 1904. [Annotated scans of selected pages]
|
|
FORMULA
|
|
|
EXAMPLE
|
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;
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
.................................
|
|
MAPLE
|
# alternative
end proc:
|
|
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, p<pmax, p = NextPrime[p], If[Mod[p, 4] == 1 || Mod[p, 4] == 2, a[n] = x[p]; Print["a(", n, ") = ", a[n]]; n++]]; Array[a, n-1] (* Jean-François Alcover, Feb 26 2016 *)
|
|
PROG
|
(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)", ")))
(PARI) do(p)=qfbsolve(Qfb(1, 0, 1), p)[2]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
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.
(Formerly M0135)
|
|
+10
15
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
|
|
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).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The 3rd prime of the form 4i+1 is 17 = 1^2 + 4^2, so a(3) = 4/2 = 2.
|
|
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, p<pmax, p = NextPrime[p], If[Mod[p, 4]==1, a[n] = k[p]; Print["a(", n, ") = ", a[n]]; n++]]; Array[a, n-1] (* Jean-François Alcover, Feb 26 2016 *)
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A095978
|
|
Number of solutions to y^2=x^3+x (mod p) as p runs through the primes.
|
|
+10
5
|
|
|
2, 3, 3, 7, 11, 19, 15, 19, 23, 19, 31, 35, 31, 43, 47, 67, 59, 51, 67, 71, 79, 79, 83, 79, 79, 99, 103, 107, 115, 127, 127, 131, 159, 139, 163, 151, 179, 163, 167, 147, 179, 163, 191, 207, 195, 199, 211, 223, 227, 259, 207, 239, 271, 251, 255, 263
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The only rational solution of y^2 = x^3 + x is (y, x) = (0, 0). See the Silverman reference, Theorem 44.1 with a proof on pp. 388 - 390 (in the 4th edition, 2014, Theorem 1, pp. 354 - 356). - Wolfdieter Lang, Feb 08 2016
This is also the number of solutions to y^2 = x^3 - 4*x (mod p) as p runs through the primes. - Seiichi Manyama, Sep 16 2016
|
|
REFERENCES
|
J. H. Silverman, A Friendly Introduction to Number Theory, 3rd ed., Pearson Education, Inc, 2006, Theorem 45.1 on p. 399. In the 4th edition, 2014, Theorem 1 on p. 365.
|
|
LINKS
|
|
|
FORMULA
|
a(1) = 2; if prime(n) == 3 (mod 4) then a(n) = prime(n); if prime(n) = A002144(m) then if A002972(m) == 1 (mod 4) then a(n) = prime(n) - 2*A002972(m), otherwise a(n) = prime(n) + 2*A002972(m).
|
|
EXAMPLE
|
n = 21: prime(21) = A000040(21) = 73 = A002144(9) == 1 (mod 4), A002972(9) = 3 == 3 (mod 4) (not 1 (mod 4)), a(n) = 73 + 2*3 = 79.
n = 22: prime(22) = A000040(22) = 79 == 3 (mod 4), a(n) = prime(22) = 79.
|
|
MAPLE
|
a:= proc(n)
local p, xy, x;
p:= ithprime(n);
if p mod 4 = 3 then return p fi;
xy:= [Re, Im](GaussInt:-GIfactors(p)[2][1][1]);
x:= op(select(type, xy, odd));
if x mod 4 = 1 then p - 2*x else p + 2*x fi
end proc:
a(1):= 2:
|
|
MATHEMATICA
|
a[n_] := Module[{p, xy, x}, p = Prime[n]; If[Mod[p, 4]==3, Return[p]]; xy = {Re[#], Im[#]}& @ FactorInteger[p, GaussianIntegers -> True][[2, 1]]; x = SelectFirst[xy, OddQ]; If[Mod[x, 4]==1, p - 2*x, p + 2*x]]; a[1] = 2; Array[a, 100] (* Jean-François Alcover, Feb 26 2016, after Robert Israel*)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Edited. Update of reference, formula corrected, examples given, and a(21) - a(56) from Wolfdieter Lang, Feb 06 2016
|
|
STATUS
|
approved
|
|
|
|
|
A173330
|
|
First of two intermediate sequences for integral solution of A002144(n)=x^2+y^2.
|
|
+10
4
|
|
|
1, 10, 1, 5, 1, 5, 46, 5, 70, 5, 9, 1, 106, 106, 126, 142, 146, 13, 9, 186, 1, 214, 13, 226, 1, 13, 9, 5, 17, 13, 306, 9, 5, 17, 366, 17, 378, 1, 406, 406, 17, 442, 21, 442, 5, 510, 21, 538, 13, 1, 570, 5, 17, 598, 25, 13, 25, 650, 1, 5, 694, 706, 9, 742, 25, 17, 786, 5, 25
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
REFERENCES
|
H. Davenport, The Higher Arithmetic (Cambridge University Press 7th ed., 1999), ch. V.3, p.122.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (2k)! / 2(k!)^2 mod p, where p = 4*k+1 = A002144(n).
|
|
EXAMPLE
|
a(7) = 26! / (2*(13!)^2) mod 53 = 403291461126605635584000000/77551576087265280000 mod 53 = 5200300 mod 53 = 46,
a(8) = 30! / (2*(15!)^2) mod 61 = 265252859812191058636308480000000/3420024505448398848000000 mod 61 = 77558760 mod 61 = 5,
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.015 seconds
|