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

A106856 Primes of the form x^2 + xy + 2y^2, with x and y nonnegative.

Original entry on oeis.org

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

Views

Author

T. D. Noe, May 09 2005, Apr 28 2008

Keywords

Comments

Discriminant=-7. Binary quadratic forms ax^2 + bxy + cy^2 have discriminant d = b^2 - 4ac.
Consider sequences of primes produced by forms with -100
The Mathematica function QuadPrimes2 is useful for finding the primes less than "lim" represented by the positive definite quadratic form ax^2 + bxy + cy^2 for any a, b and c satisfying a>0, c>0, and discriminant d<0. It does this by examining all x>=0 and y>=0 in the ellipse ax^2 + bxy + cy^2 <= lim. To find the primes generated by positive and negative x and y, compute the union of QuadPrimes2[a,b,c,lim] and QuadPrimes2[a,-b,c,lim]. - T. D. Noe, Sep 01 2009
For other programs see the "Binary Quadratic Forms and OEIS" link.

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.
  • L. E. Dickson, History of the Theory of Numbers, Vol. 3, Chelsea, 1923.

Crossrefs

Discriminants in the range -3 to -100: A007645 (d=-3), A002313 (d=-4), A045373, A106856 (d=-7), A033203 (d=-8), A056874, A106857 (d=-11), A002476 (d=-12), A033212, A106858-A106861 (d=-15), A002144, A002313 (d=-16), A106862-A106863 (d=-19), A033205, A106864-A106865 (d=-20), A106866-A106869 (d=-23), A033199, A084865 (d=-24), A002476, A106870 (d=-27), A033207 (d=-28), A033221, A106871-A106874 (d=-31), A007519, A007520, A106875-A106876 (d=-32), A106877-A106881 (d=-35), A040117, A068228, A106882 (d=-36), A033227, A106883-A106888 (d=-39), A033201, A106889 (d=-40), A106890-A106891 (d=-43), A033209, A106282, A106892-A106893 (d=-44), A033232, A106894-A106900 (d=-47), A068229 (d=-48), A106901-A106904 (d=-51), A033210, A106905-A106906 (d=-52), A033235, A106907-A106913 (d=-55), A033211, A106914-A106917 (d=-56), A106918-A106922 (d=-59), A033212, A106859 (d=-60), A106923-A106930 (d=-63), A007521, A106931 (d=-64), A106932-A106933 (d=-67), A033213, A106934-A106938 (d=-68), A033246, A106939-A106948 (d=-71), A106949-A106950 (d=-72), A033212, A106951-A106952 (d=-75), A033214, A106953-A106955 (d=-76), A033251, A106956-A106962 (d=-79), A047650, A106963-A106965 (d=-80), A106966-A106970 (d=-83), A033215, A102271, A102273, A106971-A106974 (d=-84), A033256, A106975-A106983 (d=-87), A033216, A106984 (d=-88), A106985-A106989 (d=-91), A033217 (d=-92), A033206, A106990-A107001 (d=-95), A107002-A107008 (d=-96), A107009-A107013 (d=-99).
Other collections of quadratic forms: A139643, A139827.
For a more comprehensive list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
Cf. also A242660.

Programs

  • Mathematica
    QuadPrimes2[a_, b_, c_, lmt_] := Module[{p, d, lst = {}, xMax, yMax}, d = b^2 - 4a*c; If[a > 0 && c > 0 && d < 0, xMax = Sqrt[lmt/a]*(1+Abs[b]/Floor[Sqrt[-d]])]; Do[ If[ 4c*lmt + d*x^2 >= 0, yMax = ((-b)*x + Sqrt[4c*lmt + d*x^2])/(2c), yMax = 0 ]; Do[p = a*x^2 + b*x*y + c*y^2; If[ PrimeQ[ p]  && p <= lmt && !MemberQ[ lst, p], AppendTo[ lst, p]], {y, 0, yMax}], {x, 0, xMax}]; Sort[ lst]];
    QuadPrimes2[1, 1, 2, 1000]
    (This is a corrected version of the old, incorrect, program QuadPrimes. - N. J. A. Sloane, Jun 15 2014)
    max = 1000; Table[yy = {y, 1, Floor[Sqrt[8 max - 7 x^2]/4 - x/4]}; Table[ x^2 + x y + 2 y^2, yy // Evaluate], {x, 0, Floor[Sqrt[max]]}] // Flatten // Union // Select[#, PrimeQ]& (* Jean-François Alcover, Oct 04 2018 *)
  • PARI
    list(lim)=my(q=Qfb(1,1,2), v=List([2])); forprime(p=2, lim, if(vecmin(qfbsolve(q, p))>0, listput(v,p))); Vec(v) \\ Charles R Greathouse IV, Aug 05 2016

Extensions

Removed old Mathematica programs - T. D. Noe, Sep 09 2009
Edited (pointed out error in QuadPrimes, added new version of program, checked and extended b-file). - N. J. A. Sloane, Jun 06 2014

A341788 Norms of prime elements in Z[(1+sqrt(-43))/2], the ring of integers of Q(sqrt(-43)).

Original entry on oeis.org

4, 9, 11, 13, 17, 23, 25, 31, 41, 43, 47, 49, 53, 59, 67, 79, 83, 97, 101, 103, 107, 109, 127, 139, 167, 173, 181, 193, 197, 229, 239, 251, 269, 271, 281, 283, 293, 307, 311, 317, 337, 353, 359, 361, 367, 379, 397, 401, 431, 439, 443, 461, 479, 487, 509
Offset: 1

Author

Jianing Song, Feb 19 2021

Keywords

Comments

Also norms of prime ideals in Z[(1+sqrt(-43))/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,43) >= 0 and the squares of primes such that (p,43) = -1, where (p,43) is the Legendre symbol.
For primes p such that (p,43) = 1, there are two distinct ideals with norm p in Z[(1+sqrt(-43))/2], namely (x + y*(1+sqrt(-43))/2) and (x + y*(1-sqrt(-43))/2), where (x,y) is a solution to x^2 + x*y + 11*y^2 = p; for p = 43, (sqrt(-43)) is the unique ideal with norm p; for primes p with (p,43) = -1, (p) is the only ideal with norm p^2.

Examples

			norm((1 + sqrt(-43))/2) = norm((1 - sqrt(-43))/2) = 11;
norm((3 + sqrt(-43))/2) = norm((3 - sqrt(-43))/2) = 13;
norm((5 + sqrt(-43))/2) = norm((5 - sqrt(-43))/2) = 17;
norm((7 + sqrt(-43))/2) = norm((7 - sqrt(-43))/2) = 23;
...
norm((19 + sqrt(-43))/2) = norm((19 - sqrt(-43))/2) = 101.
		

Crossrefs

The number of nonassociative elements with norm n (also the number of distinct ideals with norm n) is given by A035147.
The total number of elements with norm n is given by A138811.
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*), A341787 (D=-19), A091727 (D=-20*), this sequence (D=-43), A341789 (D=-67), A341790 (D=-163). Here a "*" indicates the cases where O_K is not a unique factorization domain.

Programs

  • PARI
    isA341788(n) = my(disc=-43); (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).

Original entry on oeis.org

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

Author

Peter Luschny, Jun 28 2024

Keywords

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.
		

Crossrefs

Family: A217831 (Euclid's triangle), A372726 (Legendre's triangle), A372877 (Jacobi's triangle), A372728 (Kronecker's triangle), A373223 (Gauss' triangle), A373748 (quadratic residue/nonresidue modulo n).
Cf. A374155 (column 1), A373748.

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

A035233 Indices of the nonzero terms in expansion of Dirichlet series Product_p (1-(Kronecker(m,p)+1)*p^(-s)+Kronecker(m,p)*p^(-2s))^(-1) for m= -43.

Original entry on oeis.org

1, 4, 9, 11, 13, 16, 17, 23, 25, 31, 36, 41, 43, 44, 47, 49, 52, 53, 59, 64, 67, 68, 79, 81, 83, 92, 97, 99, 100, 101, 103, 107, 109, 117, 121, 124, 127, 139, 143, 144, 153, 164, 167, 169, 172, 173, 176, 181, 187, 188, 193, 196, 197, 207, 208, 212, 221, 225
Offset: 1

Keywords

Comments

Also, positive numbers of the form x^2 + xy + 11y^2 (discriminant -43).

Crossrefs

Cf. A106891 (Primes of the form x^2 + xy + 11y^2).

Programs

  • PARI
    m=-43; select(x -> x, direuler(p=2,101,1/(1-(kronecker(m,p)*(X-X^2))-X)), 1) \\ Fixed by Andrey Zabolotskiy, Jul 30 2020

Extensions

More terms from Colin Barker, Jun 19 2014

A191051 Primes p that have Kronecker symbol (p|86) = 1.

Original entry on oeis.org

3, 5, 17, 19, 23, 29, 31, 37, 41, 47, 61, 79, 97, 103, 127, 131, 149, 157, 163, 167, 179, 193, 211, 227, 239, 271, 277, 281, 311, 331, 337, 347, 349, 353, 359, 367, 373, 389, 401, 419, 421, 431, 439, 467, 479, 487, 491, 499, 523, 569, 571, 587, 599, 617, 653
Offset: 1

Author

T. D. Noe, May 25 2011

Keywords

Comments

Originally incorrectly named "primes which are squares mod 86", which is sequence A106891. - M. F. Hasler, Jan 15 2016

Programs

  • Magma
    [p: p in PrimesUpTo(653) | KroneckerSymbol(p, 86) eq 1]; // Vincenzo Librandi, Sep 11 2012
    
  • Mathematica
    Select[Prime[Range[200]], JacobiSymbol[#,86]==1&]
  • PARI
    select(p->kronecker(p, 86)==1&&isprime(p), [1..1000]) \\ This is to provide a generic characteristic function ("is_A191051") as 1st arg of select(), there are other ways to produce the sequence more efficiently. - M. F. Hasler, Jan 15 2016

Extensions

Definition corrected by M. F. Hasler, Jan 15 2016
Showing 1-5 of 5 results.