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
A191028 Primes p with Kronecker symbol (p|38) = 1.
3, 7, 13, 17, 23, 29, 37, 47, 53, 59, 67, 73, 107, 109, 137, 173, 179, 181, 191, 199, 211, 227, 233, 239, 263, 269, 271, 293, 307, 311, 313, 317, 331, 353, 359, 367, 373, 379, 421, 457, 463, 479, 503, 509, 523, 547, 563, 577, 593, 617, 631, 647, 659, 661
Offset: 1
Comments
Originally incorrectly named "primes which are squares (mod 38)", which is sequence A106863. - M. F. Hasler, Jan 15 2016
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Programs
-
Magma
[p: p in PrimesUpTo(661) | KroneckerSymbol(p, 38) eq 1]; // Vincenzo Librandi, Sep 11 2012
-
Mathematica
Select[Prime[Range[200]], JacobiSymbol[#,38]==1&]
-
PARI
is(p)=kronecker(p, 38)==1&&isprime(p) \\ M. F. Hasler, Jan 15 2016
Extensions
Definition corrected (following an observation by David Broadhurst) by M. F. Hasler, Jan 15 2016
A341787 Norms of prime elements in Z[(1+sqrt(-19))/2], the ring of integers of Q(sqrt(-19)).
4, 5, 7, 9, 11, 17, 19, 23, 43, 47, 61, 73, 83, 101, 131, 137, 139, 149, 157, 163, 169, 191, 197, 199, 229, 233, 239, 251, 263, 271, 277, 283, 311, 313, 347, 349, 353, 359, 367, 389, 397, 419, 443, 457, 461, 463, 467, 479, 491, 499, 503, 541, 557, 571
Offset: 1
Comments
Also norms of prime ideals in Z[(1+sqrt(-19))/2], which is a unique factorization domain. The norm of a nonzero ideal I in a ring R is defined as the size of the quotient ring R/I.
Consists of the primes such that (p,19) >= 0 and the squares of primes such that (p,19) = -1, where (p,19) is the Legendre symbol.
For primes p such that (p,19) = 1, there are two distinct ideals with norm p in Z[(1+sqrt(-19))/2], namely (x + y*(1+sqrt(-19))/2) and (x + y*(1-sqrt(-19))/2), where (x,y) is a solution to x^2 + x*y + 5*y^2 = p; for p = 19, (sqrt(-19)) is the unique ideal with norm p; for primes p with (p,19) = -1, (p) is the only ideal with norm p^2.
Examples
norm((1 + sqrt(-19))/2) = norm((1 - sqrt(-19))/2) = 5; norm((3 + sqrt(-19))/2) = norm((3 - sqrt(-19))/2) = 7; norm((5 + sqrt(-19))/2) = norm((5 - sqrt(-19))/2) = 11; norm((7 + sqrt(-19))/2) = norm((7 - sqrt(-19))/2) = 17.
Links
- Jianing Song, Table of n, a(n) for n = 1..10000
Crossrefs
The number of nonassociative elements with norm n (also the number of distinct ideals with norm n) is given by A035171.
The total number of elements with norm n is given by A028641.
Norms of prime ideals in O_K, where K is the quadratic field with discriminant D and O_K be the ring of integers of K: A055673 (D=8), A341783 (D=5), A055664 (D=-3), A055025 (D=-4), A090348 (D=-7), A341784 (D=-8), A341785 (D=-11), A341786 (D=-15*), this sequence (D=-19), A091727 (D=-20*), A341788 (D=-43), A341789 (D=-67), A341790 (D=-163). Here a "*" indicates the cases where O_K is not a unique factorization domain.
Programs
-
PARI
isA341787(n) = my(disc=-19); (isprime(n) && kronecker(disc,n)>=0) || (issquare(n, &n) && isprime(n) && kronecker(disc,n)==-1)
A373751 Array read by ascending antidiagonals: p is a term of row A(n) if and only if p is a prime and p is a quadratic residue modulo prime(n).
2, 3, 3, 5, 7, 5, 2, 11, 13, 7, 3, 7, 19, 19, 11, 3, 5, 11, 29, 31, 13, 2, 13, 11, 23, 31, 37, 17, 5, 13, 17, 23, 29, 41, 43, 19, 2, 7, 17, 23, 31, 37, 59, 61, 23, 5, 3, 11, 19, 29, 37, 43, 61, 67, 29, 2, 7, 13, 17, 43, 43, 47, 53, 71, 73, 31, 3, 5, 13, 23, 19, 47, 53, 53, 67, 79, 79, 37
Offset: 1
Comments
p is a term of A(n) <=> p is prime and there exists an integer q such that q^2 is congruent to p modulo prime(n).
Examples
Note that the cross-references are hints, not assertions about identity. . [ n] [ p] [ 1] [ 2] [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, ... A000040 [ 2] [ 3] [ 3, 7, 13, 19, 31, 37, 43, 61, 67, 73, ... A007645 [ 3] [ 5] [ 5, 11, 19, 29, 31, 41, 59, 61, 71, 79, ... A038872 [ 4] [ 7] [ 2, 7, 11, 23, 29, 37, 43, 53, 67, 71, ... A045373 [ 5] [11] [ 3, 5, 11, 23, 31, 37, 47, 53, 59, 67, ... A056874 [ 6] [13] [ 3, 13, 17, 23, 29, 43, 53, 61, 79, 101, .. A038883 [ 7] [17] [ 2, 13, 17, 19, 43, 47, 53, 59, 67, 83, ... A038889 [ 8] [19] [ 5, 7, 11, 17, 19, 23, 43, 47, 61, 73, ... A106863 [ 9] [23] [ 2, 3, 13, 23, 29, 31, 41, 47, 59, 71, ... A296932 [10] [29] [ 5, 7, 13, 23, 29, 53, 59, 67, 71, 83, ... A038901 [11] [31] [ 2, 5, 7, 19, 31, 41, 47, 59, 67, 71, ... A267481 [12] [37] [ 3, 7, 11, 37, 41, 47, 53, 67, 71, 73, ... A038913 [13] [41] [ 2, 5, 23, 31, 37, 41, 43, 59, 61, 73, ... A038919 [14] [43] [11, 13, 17, 23, 31, 41, 43, 47, 53, 59, ... A106891 [15] [47] [ 2, 3, 7, 17, 37, 47, 53, 59, 61, 71, ... A267601 [16] [53] [ 7, 11, 13, 17, 29, 37, 43, 47, 53, 59, ... A038901 [17] [59] [ 3, 5, 7, 17, 19, 29, 41, 53, 59, 71, ... A374156 [18] [61] [ 3, 5, 13, 19, 41, 47, 61, 73, 83, 97, ... A038941 [19] [67] [17, 19, 23, 29, 37, 47, 59, 67, 71, 73, ... A106933 [20] [71] [ 2, 3, 5, 19, 29, 37, 43, 71, 73, 79, ... [21] [73] [ 2, 3, 19, 23, 37, 41, 61, 67, 71, 73, ... A038957 [22] [79] [ 2, 5, 11, 13, 19, 23, 31, 67, 73, 79, ... [23] [83] [ 3, 7, 11, 17, 23, 29, 31, 37, 41, 59, ... [24] [89] [ 2, 5, 11, 17, 47, 53, 67, 71, 73, 79, ... A038977 [25] [97] [ 2, 3, 11, 31, 43, 47, 53, 61, 73, 79, ... A038987 . Prime(n) is a term of row n because for all n >= 1, n is a quadratic residue mod n.
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..10011 (the first 141 antidiagonals, flattened).
Crossrefs
Programs
-
Maple
A := proc(n, len) local c, L, a; a := 2; c := 0; L := NULL; while c < len do if NumberTheory:-QuadraticResidue(a, n) = 1 and isprime(a) then L := L,a; c := c + 1 fi; a := a + 1 od; [L] end: seq(print(A(ithprime(n), 10)), n = 1..25);
-
Mathematica
f[m_, n_] := Block[{p = Prime@ m}, Union[ Join[{p}, Select[ Prime@ Range@ 22, JacobiSymbol[#, If[m > 1, p, 1]] == 1 &]]]][[n]]; Table[f[n, m -n +1], {m, 12}, {n, m, 1, -1}] (* To read the array by descending antidiagonals, just exchange the first argument with the second in the function "f" called by the "Table"; i.e., Table[ f[m -n +1, n], {m, 12}, {n, m, 1, -1}] *)
-
PARI
A373751_row(n, LIM=99)={ my(q=prime(n)); [p | p <- primes([1,LIM]), issquare( Mod(p, q))] } \\ M. F. Hasler, Jun 29 2024
-
SageMath
# The function 'is_quadratic_residue' is defined in A373748. def A373751_row(n, len): return [a for a in range(len) if is_quadratic_residue(a, n) and is_prime(a)] for p in prime_range(99): print([p], A373751_row(p, 100))
A267455 Primes which are a square (mod 39).
3, 13, 43, 61, 79, 103, 127, 139, 157, 181, 199, 211, 277, 283, 313, 337, 367, 373, 433, 439, 523, 547, 571, 601, 607, 673, 727, 751, 757, 823, 829, 859, 883, 907, 919, 937, 991, 997, 1039, 1063, 1069, 1093, 1117, 1153, 1171, 1213, 1231, 1249, 1291, 1297, 1303, 1327, 1381, 1429, 1447, 1453, 1459, 1483
Offset: 1
Comments
Motivated by the former (incorrect) definition of A191029.
Also, primes p which have Legendre symbols (p|3) = (p|13) = 1, together with 3 and 13.
Apparently this contains the 3 plus the elements of A139494. - R. J. Mathar, May 28 2025
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Join[{3, 13}, Select[Prime[Range[500]], JacobiSymbol[#, {3, 13}] == {1, 1} &]] (* Paolo Xausa, May 29 2025 *)
-
PARI
select(p->issquare(Mod(p,39))&&isprime(p),[1..1000])
A035243 Positive numbers of the form x^2+xy+5y^2 (discriminant -19).
1, 4, 5, 7, 9, 11, 16, 17, 19, 20, 23, 25, 28, 35, 36, 43, 44, 45, 47, 49, 55, 61, 63, 64, 68, 73, 76, 77, 80, 81, 83, 85, 92, 95, 99, 100, 101, 112, 115, 119, 121, 125, 131, 133, 137, 139, 140, 144, 149, 153, 157, 161, 163, 169, 171, 172, 175, 176, 180, 187, 188, 191, 196, 197, 199, 207, 209, 215, 220, 225, 229, 233, 235, 239, 244, 245, 251, 252, 253, 256
Offset: 1
Keywords
Comments
Indices of nonzero terms in expansion of Dirichlet series Product_p (1-(Kronecker(m,p)+1)*p^(-s)+Kronecker(m,p)*p^(-2s))^(-1) for m= -19 (A035171). [amended by Georg Fischer, Sep 03 2020]
Programs
-
PARI
m=-19; select(x -> x, direuler(p=2,101,1/(1-(kronecker(m,p)*(X-X^2))-X)), 1) \\ Fixed by Andrey Zabolotskiy, Sep 03 2020
Extensions
Edited by N. J. A. Sloane, Jun 01 2014
A106862 Primes of the form x^2+xy+5y^2, with x and y nonnegative.
5, 7, 11, 17, 23, 47, 61, 73, 83, 101, 131, 137, 139, 149, 157, 163, 191, 197, 199, 229, 251, 263, 271, 277, 283, 311, 347, 349, 353, 359, 367, 389, 419, 443, 457, 461, 463, 467, 499, 503, 541, 557, 571, 593, 613, 617, 619, 631, 643, 647, 653, 691, 701, 719
Offset: 1
Comments
Discriminant=-19.
Links
- Vincenzo Librandi and Ray Chandler, Table of n, a(n) for n = 1..10000 [First 4000 terms from Vincenzo Librandi]
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Programs
-
Mathematica
QuadPrimes2[1, 1, 5, 10000] (* see A106856 *)
Comments
References
Links
Crossrefs
Programs
Mathematica
PARI
Extensions