A106856 Primes of the form x^2 + xy + 2y^2, with x and y nonnegative.
2, 11, 23, 37, 43, 53, 71, 79, 107, 109, 127, 137, 149, 151, 163, 193, 197, 211, 233, 239, 263, 281, 317, 331, 337, 373, 389, 401, 421, 431, 443, 463, 487, 491, 499, 541, 547, 557, 569, 599, 613, 617, 641, 653, 659, 673, 683, 739, 743, 751, 757, 809, 821
Offset: 1
A002144 Pythagorean primes: primes of the form 4*k + 1.
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
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
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
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.
Links
- Zak Seidov, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math.Series 55, Tenth Printing, 1972.
- C. Banderier, Calcul de (-1/p).
- J. Butcher, Mathematical Miniature 8: The Quadratic Residue Theorem, NZMS Newsletter, No. 75, April 1999.
- Hing Lun Chan, Windmills of the minds: an algorithm for Fermat's Two Squares Theorem, arXiv:2112.02556 [cs.LO], 2021.
- R. Chapman, Quadratic reciprocity.
- A. David Christopher, A partition-theoretic proof of Fermat's Two Squares Theorem, Discrete Mathematics, Volume 339, Issue 4, 6 April 2016, Pages 1410-1411.
- J. E. Ewell, A Simple Proof of Fermat's Two-Square Theorem, The American Mathematical Monthly, Vol. 90, No. 9 (Nov., 1983), pp. 635-637.
- Bernard Frénicle de Bessy, Traité des triangles rectangles en nombres : dans lequel plusieurs belles propriétés de ces triangles sont démontrées par de nouveaux principes, Michalet, Paris (1676) pp. 0-116; see p. 44, Consequence II.
- Bernard Frénicle de Bessy, Méthode pour trouver la solution des problèmes par les exclusions. Abrégé des combinaisons. Des Quarrez magiques, in "Divers ouvrages de mathématiques et de physique, par MM. de l'Académie royale des sciences", (1693) "Troisième exemple", pp. 17-26, see in particular p. 25.
- A. Granville and G. Martin, Prime number races, arXiv:math/0408319 [math.NT], 2004.
- D. & C. Hazzlewood, Quadratic Reciprocity.
- Ernest G. Hibbs, Component Interactions of the Prime Numbers, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33.
- Lucas Lacasa, Bartolome Luque, Ignacio Gómez, and Octavio Miramontes, On a Dynamical Approach to Some Prime Number Sequences, Entropy 20.2 (2018): 131, also arXiv:1802.08349 [math.NT], 2018.
- R. C. Laubenbacher and D. J. Pengelley, Eisenstein's Misunderstood Geometric Proof of the Quadratic Reciprocity Theorem, In: Anderson M, Katz V, Wilson R, eds. Who Gave You the Epsilon?: And Other Tales of Mathematical History. Spectrum. Mathematical Association of America; 2009:309-312.
- R. C. Laubenbacher and D. J. Pengelley, Gauss, Eisenstein and the 'third' proof of the Quadratic Reciprocity Theorem, The Mathematical Intelligencer 16, 67-72 (1994).
- K. Matthews, Serret's algorithm based Server.
- Jorma K. Merikoski, Pentti Haukkanen, and Timo Tossavainen, The congruence x^n = -a^n (mod m): Solvability and related OEIS sequences, Notes. Num. Theor. Disc. Math. (2024) Vol. 30, No. 3, 516-529. See p. 521.
- Carlos Rivera, Puzzle 968. Another property of primes 4m+1, The Prime Puzzles & Problems Connection.
- D. Shanks, Review of "K. E. Kloss et al., Class number of primes of the form 4n+1", Math. Comp., 23 (1969), 213-214. [Annotated scanned preprint of review]
- S. A. Shirali, A family portrait of primes-a case study in discrimination, Math. Mag. Vol. 70, No. 4 (Oct., 1997), pp. 263-272.
- Rosemary Sullivan and Neil Watling, Independent divisibility pairs on the set of integers from 1 to n, INTEGERS 13 (2013) #A65.
- Eric Weisstein's World of Mathematics, Wilson's Theorem.
- Eric Weisstein's World of Mathematics, Pythagorean Triples.
- Wikipedia, Quadratic reciprocity
- Wolfram Research, The Gauss Reciprocity Law.
- G. Xiao, Two squares.
- D. Zagier, A One-Sentence Proof That Every Prime p == 1 (mod 4) Is a Sum of Two Squares, Am. Math. Monthly, Vol. 97, No. 2 (Feb 1990), p. 144. [From _Wolfdieter Lang_, Jan 17 2015 (thanks to Charles Nash)]
- Index to sequences related to decomposition of primes in quadratic fields.
Crossrefs
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(#A2144
A002144_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
A007528 Primes of the form 6k-1.
5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89, 101, 107, 113, 131, 137, 149, 167, 173, 179, 191, 197, 227, 233, 239, 251, 257, 263, 269, 281, 293, 311, 317, 347, 353, 359, 383, 389, 401, 419, 431, 443, 449, 461, 467, 479, 491, 503, 509, 521, 557, 563, 569, 587
Offset: 1
Comments
For values of k see A024898.
Also primes p such that p^q - 2 is not prime where q is an odd prime. These numbers cannot be prime because the binomial p^q = (6k-1)^q expands to 6h-1 some h. Then p^q-2 = 6h-1-2 is divisible by 3 thus not prime. - Cino Hilliard, Nov 12 2008
a(n) = A211890(3,n-1) for n <= 4. - Reinhard Zumkeller, Jul 13 2012
There exists a polygonal number P_s(3) = 3s - 3 = a(n) + 1. These are the only primes p with P_s(k) = p + 1, s >= 3, k >= 3, since P_s(k) - 1 is composite for k > 3. - Ralf Steiner, May 17 2018
From Bernard Schott, Feb 14 2019: (Start)
A theorem due to Andrzej Mąkowski: every integer greater than 161 is the sum of distinct primes of the form 6k-1. Examples: 162 = 5 + 11 + 17 + 23 + 47 + 59; 163 = 17 + 23 + 29 + 41 + 53. (See Sierpiński and David Wells.)
Except for 2 and 3, all Sophie Germain primes are of the form 6k-1.
Except for 3, all the lesser of twin primes are also of the form 6k-1.
Dirichlet's theorem on arithmetic progressions states that this sequence is infinite. (End)
For all elements of this sequence p=6*k-1, there are no (x,y) positive integers such that k=6*x*y-x+y. - Pedro Caceres, Apr 06 2019
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. 870.
- A. Mąkowski, Partitions into unequal primes, Bull. Acad. Polon. Sci. Sér. Sci. Math. Astr. Phys. 8 (1960), 125-126.
- Wacław Sierpiński, Elementary Theory of Numbers, p. 144, Warsaw, 1964.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, Revised edition, 1997, p. 127.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- F. S. Carey, On some cases of the Solutions of the Congruence z^p^(n-1)=1, mod p, Proceedings of the London Mathematical Society, Volume s1-33, Issue 1, November 1900, Pages 294-312.
- Amelia Carolina Sparavigna, The Pentagonal Numbers and their Link to an Integer Sequence which contains the Primes of Form 6n-1, Politecnico di Torino (Italy, 2021).
- Amelia Carolina Sparavigna, Binary operations inspired by generalized entropies applied to figurate numbers, Politecnico di Torino (Italy, 2021).
- Wikipedia, Dirichlet's theorem on arithmetic progressions.
Crossrefs
Prime sequences A# (k,r) of the form k*n+r with 0 <= r <= k-1 (i.e., primes == r (mod k), or primes p with p mod k = r) and gcd(r,k)=1: A000040 (1,0), A065091 (2,1), A002476 (3,1), A003627 (3,2), A002144 (4,1), A002145 (4,3), A030430 (5,1), A045380 (5,2), A030431 (5,3), A030433 (5,4), A002476 (6,1), this sequence (6,5), A140444 (7,1), A045392 (7,2), A045437 (7,3), A045471 (7,4), A045458 (7,5), A045473 (7,6), A007519 (8,1), A007520 (8,3), A007521 (8,5), A007522 (8,7), A061237 (9,1), A061238 (9,2), A061239 (9,4), A061240 (9,5), A061241 (9,7), A061242 (9,8), A030430 (10,1), A030431 (10,3), A030432 (10,7), A030433 (10,9), A141849 (11,1), A090187 (11,2), A141850 (11,3), A141851 (11,4), A141852 (11,5), A141853 (11,6), A141854 (11,7), A141855 (11,8), A141856 (11,9), A141857 (11,10), A068228 (12,1), A040117 (12,5), A068229 (12,7), A068231 (12,11).
Cf. A034694 (smallest prime == 1 (mod n)).
Cf. A038700 (smallest prime == n-1 (mod n)).
Cf. A038026 (largest possible value of smallest prime == r (mod n)).
Programs
-
GAP
Filtered(List([1..100],n->6*n-1),IsPrime); # Muniru A Asiru, May 19 2018
-
Haskell
a007528 n = a007528_list !! (n-1) a007528_list = [x | k <- [0..], let x = 6 * k + 5, a010051' x == 1] -- Reinhard Zumkeller, Jul 13 2012
-
Maple
select(isprime,[seq(6*n-1,n=1..100)]); # Muniru A Asiru, May 19 2018
-
Mathematica
Select[6 Range[100]-1,PrimeQ] (* Harvey P. Dale, Feb 14 2011 *)
-
PARI
forprime(p=2, 1e3, if(p%6==5, print1(p, ", "))) \\ Charles R Greathouse IV, Jul 15 2011
-
PARI
forprimestep(p=5,1000,6, print1(p", ")) \\ Charles R Greathouse IV, Mar 03 2025
Formula
A003627 \ {2}. - R. J. Mathar, Oct 28 2008
Conjecture: Product_{n >= 1} ((a(n) - 1) / (a(n) + 1)) * ((A002476(n) + 1) / (A002476(n) - 1)) = 3/4. - Dimitris Valianatos, Feb 11 2020
From Vaclav Kotesovec, May 02 2020: (Start)
Product_{k>=1} (1 + 1/a(k)^2) = A334482.
Product_{k>=1} (1 - 1/a(k)^3) = A334480.
Product_{k>=1} (1 + 1/a(k)^3) = A334479. (End)
Legendre symbol (-3, a(n)) = -1 and (-3, A002476(n)) = +1, for n >= 1. For prime 3 one sets (-3, 3) = 0. - Wolfdieter Lang, Mar 03 2021
A140633 Primes of the form 7x^2+4xy+52y^2.
7, 103, 127, 223, 367, 463, 487, 607, 727, 823, 967, 1063, 1087, 1303, 1327, 1423, 1447, 1543, 1567, 1663, 1783, 2143, 2287, 2383, 2503, 2647, 2767, 2887, 3343, 3463, 3583, 3607, 3727, 3823, 3847, 3943, 3967, 4327, 4423, 4447, 4567, 4663
Offset: 1
Comments
Discriminant=-1440. Also primes of the forms 7x^2+6xy+87y^2 and 7x^2+2xy+103y^2.
Voight proves that there are exactly 69 equivalence classes of positive definite binary quadratic forms that represent almost the same primes. 48 of those quadratic forms are of the idoneal type discussed in A139827. The remaining 21 begin at A140613 and end here. The cross-references section lists the quadratic forms in the same order as tables 1-6 in Voight's paper. Note that A107169 and A139831 are in the same equivalence class.
In base 12, the sequence is 7, 87, X7, 167, 267, 327, 347, 427, 507, 587, 687, 747, 767, 907, 927, 9X7, X07, X87, XX7, E67, 1047, 12X7, 13X7, 1467, 1547, 1647, 1727, 1807, 1E27, 2007, 20X7, 2107, 21X7, 2267, 2287, 2347, 2367, 2607, 2687, 26X7, 2787, 2847, where X is for 10 and E is for 11. Moreover, the discriminant is X00 and that all elements are {7, 87, X7, 167, 187, 247} mod 260. - Walter Kehowski, May 31 2008
Links
- Vincenzo Librandi and Ray Chandler, Table of n, a(n) for n = 1..10000 [First 1000 terms from Vincenzo Librandi]
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
- John Voight, Quadratic forms that represent almost the same primes, Math. Comp., Vol. 76 (2007), pp. 1589-1617.
Crossrefs
Programs
-
Mathematica
Union[QuadPrimes2[7, 4, 52, 10000], QuadPrimes2[7, -4, 52, 10000]] (* see A106856 *)
A017077 a(n) = 8*n + 1.
1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 105, 113, 121, 129, 137, 145, 153, 161, 169, 177, 185, 193, 201, 209, 217, 225, 233, 241, 249, 257, 265, 273, 281, 289, 297, 305, 313, 321, 329, 337, 345, 353, 361, 369, 377, 385, 393, 401, 409, 417, 425, 433
Offset: 0
Comments
a(n-1), n >= 1, gives the first column of the triangle A238475 related to the Collatz problem. - Wolfdieter Lang, Mar 12 2014
First differences of A054552. - Wesley Ivan Hurt, Jul 08 2014
An odd number is congruent to a perfect square modulo every power of 2 iff it is in this sequence. Sketch of proof: Suppose the modulus is 2^k with k at least three and note that the only odd quadratic residue (mod 8) is 1. By application of difference of squares and the fact that gcd(x-y,x+y)=2 we can show that for odd x,y, we have x^2 and y^2 congruent mod 2^k iff x is congruent to one of y, 2^(k-1)-y, 2^(k-1)+y, 2^k-y. Now when we "lift" to (mod 2^(k+1)) we see that the degeneracy between a^2 and (2^(k-1)-a)^2 "breaks" to give a^2 and a^2-2^ka+2^(2k-2). Since a is odd, the latter is congruent to a^2+2^k (mod 2^(k+1)). Hence we can form every binary number that ends with '001' by starting modulo 8 and "lifting" while adding digits as necessary. But this sequence is exactly the set of binary numbers ending in '001', so our claim is proved. - Rafay A. Ashary, Oct 23 2016
For n > 3, also the number of (not necessarily maximal) cliques in the n-antiprism graph. - Eric W. Weisstein, Nov 29 2017
Bisection of A016813. - L. Edson Jeffery, Apr 26 2022
Examples
Illustration of initial terms: . o o o . o o o o o o . o o o o o o o o o . o o o o o o o o o o o o . o o o o o o o o o o o o o o o o o o o o o o o o o . o o o o o o o o o o o o . o o o o o o o o o . o o o o o o . o o o -------------------------------------------------------------- . 1 9 17 25 33 - _Bruno Berselli_, Feb 28 2014
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Tanya Khovanova, Recursive Sequences.
- Luis Manuel Rivera, Integer sequences and k-commuting permutations, arXiv preprint arXiv:1406.3081 [math.CO], 2014.
- Eric Weisstein's World of Mathematics, Antiprism Graph.
- Eric Weisstein's World of Mathematics, Clique.
- Index entries for linear recurrences with constant coefficients, signature (2,-1).
Crossrefs
Programs
-
Haskell
a017077 = (+ 1) . (* 8) a017077_list = [1, 9 ..] -- Reinhard Zumkeller, Dec 28 2012
-
Magma
I:=[1,9]; [n le 2 select I[n] else 2*Self(n-1)-Self(n-2): n in [1..60]]; // Vincenzo Librandi, Mar 14 2014
-
Magma
[8*n+1 : n in [0..50]]; // Wesley Ivan Hurt, Jul 08 2014
-
Maple
A017077:=n->8*n+1: seq(A017077(n), n=0..50); # Wesley Ivan Hurt, Jul 08 2014
-
Mathematica
Table[8 n + 1, {n, 0, 6!}] (* Vladimir Joseph Stephan Orlovsky, Mar 10 2010 *) CoefficientList[Series[(1 + 7 x)/(1 - x)^2, {x, 0, 60}], x] (* Vincenzo Librandi, Mar 14 2014 *) 8 Range[0, 50] + 1 (* Wesley Ivan Hurt, Jul 08 2014 *) LinearRecurrence[{2, -1}, {9, 17}, {0, 20}] (* Eric W. Weisstein, Nov 29 2017 *)
-
PARI
a(n)=8*n+1 \\ Charles R Greathouse IV, Jul 10 2016
Formula
G.f.: (1+7*x)/(1-x)^2.
a(n+1) = A004768(n). - R. J. Mathar, May 28 2008
a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, Mar 14 2014
E.g.f.: exp(x)*(1 + 8*x). - Stefano Spezia, May 13 2021
From Elmo R. Oliveira, Apr 10 2025: (Start)
a(n) = a(n-1) + 8 with a(0)=1.
a(n) = A016813(2*n). (End)
A001132 Primes == +-1 (mod 8).
7, 17, 23, 31, 41, 47, 71, 73, 79, 89, 97, 103, 113, 127, 137, 151, 167, 191, 193, 199, 223, 233, 239, 241, 257, 263, 271, 281, 311, 313, 337, 353, 359, 367, 383, 401, 409, 431, 433, 439, 449, 457, 463, 479, 487, 503, 521, 569, 577, 593, 599
Offset: 1
Comments
Primes p such that 2 is a quadratic residue mod p.
Also primes p such that p divides 2^((p-1)/2) - 1. - Cino Hilliard, Sep 04 2004
A001132 is exactly formed by the prime numbers of A118905: in fact at first every prime p of A118905 is p = u^2 - v^2 + 2uv, with for example u odd and v even so that p - 1 = 4u'(u' + 1) + 4v'(2u' + 1 - v') when u = 2u' + 1 and v = 2v'. u'(u' + 1) is even and v'(2u' + 1 - v') is always even. At second hand if p = 8k +- 1, p has the shape x^2 - 2y^2; letting u = x - y and v = y, comes p = (x - y)^2 - y^2 + 2(x - y)y = u^2 - v^2 + 2uv so p is a sum of the two legs of a Pythagorean triangle. - Richard Choulet, Dec 16 2008
These are also the primes of form x^2 - 2y^2, excluding 2. See A038873. - Tito Piezas III, Dec 28 2008
Primes p such that p^2 mod 48 = 1. - Gary Detlefs, Dec 29 2011
Primes in A047522. - Reinhard Zumkeller, Jan 07 2012
This sequence gives the odd primes p which satisfy C(p, x = 0) = +1, where C(p, x) is the minimal polynomial of 2*cos(Pi/p) (see A187360). For the proof see a comment on C(n, 0) in A230075. - Wolfdieter Lang, Oct 24 2013
Each a(n) corresponds to precisely one primitive Pythagorean triangle. For a proof see the W. Lang link, also for a table. See also the comment by Richard Choulet above, where the case u even and v odd has not been considered. - Wolfdieter Lang, Feb 17 2015
Primes p such that p^2 mod 16 = 1. - Vincenzo Librandi, May 23 2016
Rational primes that decompose in the field Q(sqrt(2)). - N. J. A. Sloane, Dec 26 2017
References
- Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
- Ronald S. Irving, Integers, Polynomials, and Rings. New York: Springer-Verlag (2004): 274.
- 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
- Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
- Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- C. Banderier, Calcul de (2/p)
- Wolfdieter Lang, A001132: Primes +1 (mod 8) or -1 (mod 8) and Sum of Legs of Primitive Pythagorean Triangles.
- Index entries for related sequences
- Index to sequences related to decomposition of primes in quadratic fields
Crossrefs
For primes p such that x^m = 2 (mod p) has a solution see A001132 (for m = 2), A040028 (m = 3), A040098 (m = 4), A040159 (m = 5), A040992 (m = 6), A042966 (m = 7), A045315 (m = 8), A049596 (m = 9), A049542 (m = 10) - A049595 (m = 63). Jeff Lagarias (lagarias(AT)umich.edu) points out that all these sequences are different, although this may not be apparent from looking just at the initial terms.
Agrees with A038873 except for initial term.
Programs
-
Haskell
a001132 n = a001132_list !! (n-1) a001132_list = [x | x <- a047522_list, a010051 x == 1] -- Reinhard Zumkeller, Jan 07 2012
-
Magma
[p: p in PrimesUpTo (600) | p^2 mod 16 eq 1]; // Vincenzo Librandi, May 23 2016
-
Maple
seq(`if`(member(ithprime(n) mod 8, {1,7}),ithprime(n),NULL),n=1..109); # Nathaniel Johnston, Jun 26 2011 for n from 1 to 600 do if (ithprime(n)^2 mod 48 = 1) then print(ithprime(n)) fi od. # Gary Detlefs, Dec 29 2011
-
Mathematica
Select[Prime[Range[250]], MemberQ[{1, 7}, Mod[#, 8]] &] (* Harvey P. Dale, Apr 29 2011 *) Select[Union[8Range[100] - 1, 8Range[100] + 1], PrimeQ] (* Alonso del Arte, May 22 2016 *)
-
PARI
select(p->p%8==1 ||p%8==7, primes(100)) \\ Charles R Greathouse IV, May 18 2015
Formula
a(n) ~ 2n log n. - Charles R Greathouse IV, May 18 2015
A107008 Primes of the form x^2 + 24*y^2.
73, 97, 193, 241, 313, 337, 409, 433, 457, 577, 601, 673, 769, 937, 1009, 1033, 1129, 1153, 1201, 1249, 1297, 1321, 1489, 1609, 1657, 1753, 1777, 1801, 1873, 1993, 2017, 2089, 2113, 2137, 2161, 2281, 2377, 2473, 2521, 2593, 2617, 2689, 2713
Offset: 1
Comments
Presumably this is the same as primes congruent to 1 mod 24, so a(n) = 24*A111174(n) + 1. - N. J. A. Sloane, Jul 11 2008. Checked for all terms up to 2 million. - Vladimir Joseph Stephan Orlovsky, May 18 2011.
Discriminant = -96.
Primes of the quadratic form are a subset of the primes congruent to 1 (mod 24). [Proof. For 0 <= x, y <= 23, the only values mod 24 that x^2 + 24*y^2 can take are 0, 1, 4, 9, 12 or 16. All of these r except 1 have gcd(r, 24) > 1 so if x^2 + 24*y^2 is prime its remainder mod 24 must be 1.] - David A. Corneth, Jun 08 2020
More advanced mathematics seems to be needed to determine whether this sequence lists all primes congruent to 1 (mod 24). Note the significance of 24 being a convenient number, as described in A000926. See also Sloane et al., Binary Quadratic Forms and OEIS, which explains how the table in A139642 may be used for this determination. - Peter Munn, Jun 21 2020
Primes == 1 (mod 2^3*3) are the intersection of the primes == 1 (mod 2^3) in A007519 and the primes == 1 (mod 3) in A002476, by the Chinese remainder theorem. - R. J. Mathar, Jun 11 2020
Links
- Vincenzo Librandi, N. J. A. Sloane and Ray Chandler, Table of n, a(n) for n = 1..10000 [First 1000 terms from Vincenzo Librandi, next 143 terms from N. J. A. Sloane]
- P. L. Clark, J. Hicks, H. Parshall, K. Thompson, GONI: primes represented by binary quadratic forms, INTEGERS 13 (2013) #A37
- D. A. Cox, Primes of the form x^2 + n*y^2, A Wiley-Interscience publication, 1989
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
- J. Voight, Quadratic forms that represent almost the same primes, Math. Comp. 76 (2007) 1589-1617
Crossrefs
Programs
-
Mathematica
QuadPrimes[1, 0, 24, 10000] (* see A106856 *)
-
PARI
is(n) = isprime(n) && #qfbsolve(Qfb(1, 0, 24), n) == 2 \\ David A. Corneth, Jun 21 2020
Extensions
Recomputed b-file, deleted incorrect Mma program. - N. J. A. Sloane, Jun 08 2014
A005123 Numbers k such that 8k + 1 is prime.
2, 5, 9, 11, 12, 14, 17, 24, 29, 30, 32, 35, 39, 42, 44, 50, 51, 54, 56, 57, 65, 71, 72, 74, 75, 77, 80, 84, 95, 96, 101, 107, 110, 116, 117, 119, 122, 126, 129, 131, 137, 141, 144, 149, 150, 152, 156, 161, 162, 165, 170, 176, 179, 185, 186, 194, 200, 201
Offset: 1
Keywords
Comments
4*a(n) is the degree of the minimal polynomial of 2*cos(Pi/A007519(n)), called C(A007519(n), x) in A187360. - Wolfdieter Lang, Oct 24 2013
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
Programs
-
Magma
[n: n in [0..200] | IsPrime(8*n+1)]; // Vincenzo Librandi, Jun 25 2014
-
Mathematica
Select[Range[0, 300], PrimeQ[8 # + 1] &] (* Vincenzo Librandi, Jun 25 2014 *)
-
PARI
is(n)=isprime(8*n+1) \\ Charles R Greathouse IV, Apr 29 2015
Formula
a(n) = (A007519(n)-1)/8. - Zak Seidov, Sep 26 2007
Extensions
More terms from Wesley Ivan Hurt, Jun 25 2014
A094407 Primes of the form 16n+1.
17, 97, 113, 193, 241, 257, 337, 353, 401, 433, 449, 577, 593, 641, 673, 769, 881, 929, 977, 1009, 1153, 1201, 1217, 1249, 1297, 1361, 1409, 1489, 1553, 1601, 1697, 1777, 1873, 1889, 2017, 2081, 2113, 2129, 2161, 2273, 2417, 2593, 2609, 2657, 2689, 2753
Offset: 1
Comments
Subsequence of A007519 (primes of form 8n+1). - Zak Seidov, May 16 2012
Primes p such that p XOR 14 = p + 14. - Brad Clardy, Jul 23 2012
A prime of the form 16n+1 is represented either by both x^2+32y^2 and x^2+64y^2 or by neither (see Kaplansky link). - Michel Marcus, Dec 23 2012
Odd primes p such that -1 is an 8th power mod p. - Eric M. Schmidt, Mar 27 2014
Links
- T. D. Noe, Table of n, a(n) for n=1..1000
- C, Caldwell, Prime test.
- Irving Kaplansky, The forms x+32y^2 and x+64y^2, Proc. Amer. Math. Soc. 131 (2003), 2299-2300
Crossrefs
Programs
-
Haskell
a094407 n = a094407_list !! (n-1) a094407_list = filter ((== 1) . a010051) [1,17..] -- Reinhard Zumkeller, Mar 06 2012
-
Maple
p:=proc(n) if isprime(16*n+1)=true then 16*n+1 else fi end:seq(p(n),n=1..200); # Emeric Deutsch, Dec 23 2004
-
Mathematica
lst={};Do[p=16*n+1;If[PrimeQ[p],AppendTo[lst,p]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Feb 26 2009 *) Select[16*Range[200]+1,PrimeQ] (* Harvey P. Dale, Nov 04 2017 *)
Extensions
More terms from Emeric Deutsch, Dec 23 2004
A139490 Numbers n such that the quadratic form x^2 + n*x*y + y^2 represents exactly the same primes as the quadratic form x^2 + m*y^2 for some m.
1, 4, 6, 7, 8, 10, 14, 16, 18, 22, 26, 38, 58, 82, 86
Offset: 1
Keywords
Comments
For the numbers m see A139491.
Conjecture: This sequence is finite and complete (checked for range n<=200 and m<=500).
Examples
a(1)=1 because the primes represented by x^2+xy+y^2 are the same as the primes represented by x^2 + 3*y^2 (see A007645). The known pairs (n,m) are the following (checked for range n<=200 and m<=500): n={1, 4, 4, 6, 6, 7, 8, 8, 10, 10, 10, 14, 14, 14, 16, 18, 22, 22, 26, 38, 38} m={3, 9, 12, 8, 16, 15, 45, 60, 24, 48, 72, 24, 48, 72, 21, 40, 120, 240, 168, 120, 240}.
Links
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Crossrefs
Programs
-
Mathematica
f = 200; g = 300; h = 30; j = 100; b = {}; Do[a = {}; Do[Do[If[PrimeQ[x^2 + n y^2], AppendTo[a, x^2 + n y^2]], {x, 0, g}], {y, 1, g}]; AppendTo[b, Take[Union[a], h]], {n, 1, f}]; Print[b]; c = {}; Do[a = {}; Do[Do[If[PrimeQ[n^2 + w*n*m + m^2], AppendTo[a, n^2 + w*n*m + m^2]], {n, m, g}], {m, 1, g}]; AppendTo[c, Take[Union[a], h]], {w, 1, j}]; Print[c]; bb = {}; cc = {}; Do[Do[If[b[[p]] == c[[q]], AppendTo[bb, p]; AppendTo[cc, q]], {p, 1, f}], {q, 1, j}]; Union[cc] (*Artur Jasinski*)
Extensions
Edited by N. J. A. Sloane, Apr 25 2008
Extended by T. D. Noe, Apr 27 2009
Typo fixed by Charles R Greathouse IV, Oct 28 2009
Comments
References
Links
Crossrefs
Programs
Mathematica
PARI
Extensions