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

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

Views

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

A141181 Primes of the form 2*x^2+3*x*y-4*y^2 (as well as of the form 2*x^2+7*x*y+y^2).

Original entry on oeis.org

2, 5, 23, 31, 37, 41, 43, 59, 61, 73, 83, 103, 107, 113, 127, 131, 139, 163, 173, 197, 223, 241, 251, 269, 271, 277, 283, 307, 337, 349, 353, 359, 367, 373, 379, 389, 401, 409, 419, 431, 433, 443, 449, 461, 467, 487, 491, 523, 541, 569, 599, 607, 613, 617, 619
Offset: 1

Views

Author

Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (oscfalgan(AT)yahoo.es), Jun 12 2008

Keywords

Comments

Discriminant = 41. Class = 1. Binary quadratic forms a*x^2+b*x*y+c*y^2 have discriminant d=b^2-4ac and gcd(a,b,c)=1.
It appears that this is the same as "Primes that are squares (mod 41)", cf. A038919 and A373751. - M. F. Hasler, Jun 29 2024

Examples

			a(3) = 23 because we can write 23 = 2*3^2+3*3*1-4*1^2 (or 23 = 2*2^2+7*2*1+1^2).
		

References

  • Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966.
  • D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.

Crossrefs

Cf. A038872 (d=5). A038873 (d=8). A068228, A141123 (d=12). A038883 (d=13). A038889 (d=17). A141111, A141112 (d=65).
Primes in A035269.
A subsequence of (and may possibly coincide with) A038919. - R. J. Mathar, Jul 22 2008
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.

Programs

  • Mathematica
    Reap[For[p = 2, p < 1000, p = NextPrime[p], If[FindInstance[p == 2*x^2 + 3*x*y - 4*y^2, {x, y}, Integers, 1] =!= {}, Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Oct 25 2016 *)
  • PARI
    select(p->isprime(p)&&qfbsolve(Qfb(1,7,2),p),[1..1500]) \\ This is to provide a generic characteristic function ("is_A141181") as 1st arg of select(), there are other ways to produce the sequence more efficiently. - M. F. Hasler, Jan 15 2016

A191049 Primes p that have Kronecker symbol (p|82) = 1.

Original entry on oeis.org

3, 11, 13, 19, 23, 29, 31, 53, 67, 73, 101, 103, 109, 113, 127, 149, 157, 179, 181, 211, 223, 227, 229, 241, 271, 293, 317, 331, 337, 347, 353, 359, 367, 397, 401, 409, 421, 431, 433, 449, 487, 499, 509, 547, 557, 563, 569, 571, 587, 599, 607, 617, 631, 643
Offset: 1

Views

Author

T. D. Noe, May 25 2011

Keywords

Comments

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

Crossrefs

Programs

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

Extensions

Definition corrected (following an observation by David Broadhurst) by M. F. Hasler, Jan 15 2016

A191030 Primes that are quadratic residues mod 41.

Original entry on oeis.org

2, 5, 23, 31, 37, 43, 59, 61, 73, 83, 103, 107, 113, 127, 131, 139, 163, 173, 197, 223, 241, 251, 269, 271, 277, 283, 307, 337, 349, 353, 359, 367, 373, 379, 389, 401, 409, 419, 431, 433, 443, 449, 461, 467, 487, 491, 523, 541, 569, 599, 607, 613, 617, 619
Offset: 1

Views

Author

T. D. Noe, May 24 2011

Keywords

Comments

The only difference between A191030 and A038919 is the term A038919(6) = 41. - Zak Seidov, May 24 2013
Due to quadratic reciprocity, p is a square (mod 41) iff 41 is a square (mod p). The notion "quadratic residue" excludes here equality / zero, so 41 is not in this sequence but in A038919, because 41 = 41^2 (mod 41). - M. F. Hasler, Jan 17 2016

Crossrefs

Cf. A038919. - Zak Seidov, May 24 2013

Programs

  • Magma
    [p: p in PrimesUpTo(619) | JacobiSymbol(p, 41) eq 1]; // Vincenzo Librandi, Sep 10 2012
  • Mathematica
    Select[Prime[Range[200]], JacobiSymbol[#,41]==1&]

Extensions

Definition adjusted by M. F. Hasler, Jan 19 2016
Showing 1-4 of 4 results.