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

A000229 a(n) is the least number m such that the n-th prime is the least quadratic nonresidue modulo m.

Original entry on oeis.org

3, 7, 23, 71, 311, 479, 1559, 5711, 10559, 18191, 31391, 422231, 701399, 366791, 3818929, 9257329, 22000801, 36415991, 48473881, 175244281, 120293879, 427733329, 131486759, 3389934071, 2929911599, 7979490791, 36504256799, 23616331489, 89206899239, 121560956039
Offset: 1

Views

Author

Keywords

Comments

Note that a(n) is always a prime q > prime(n).
For n > 1, a(n) = prime(k), where k is the smallest number such that A053760(k) = prime(n).
One could make a case for setting a(1) = 2, but a(1) = 3 seems more in keeping with the spirit of the sequence.
a(n) is the smallest odd prime q such that prime(n)^((q-1)/2) == -1 (mod q) and b^((q-1)/2) == 1 (mod q) for every natural base b < prime(n). - Thomas Ordowski, May 02 2019

Examples

			a(2) = 7 because the second prime is 3 and 3 is the least quadratic nonresidue modulo 7, 14, 17, 31, 34, ... and 7 is the least of these.
		

References

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

Crossrefs

Cf. A020649, A025021, A053760, A307809. For records see A133435.
Differs from A002223, A045535 at 12th term.

Programs

  • Mathematica
    leastNonRes[p_] := For[q = 2, True, q = NextPrime[q], If[JacobiSymbol[q, p] != 1, Return[q]]]; a[1] = 3; a[n_] := For[pn = Prime[n]; k = 1, True, k++, an = Prime[k]; If[pn == leastNonRes[an], Print[n, " ", an];  Return[an]]]; Array[a, 20] (* Jean-François Alcover, Nov 28 2015 *)

Extensions

Definition corrected by Melvin J. Knight (MELVIN.KNIGHT(AT)ITT.COM), Dec 08 2006
Name edited by Thomas Ordowski, May 02 2019

A025020 Numbers whose least quadratic nonresidue (A020649) is 2.

Original entry on oeis.org

3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 32, 33, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 83, 84, 85, 86, 87, 88, 90, 91, 92
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Min @ Complement[Range[# - 1], Mod[Range[#/2]^2, #]] == 2 &] (* Amiram Eldar, Oct 31 2020 *)
  • PARI
    isA025020(n)={local(r);r=1;for(m=1,n-1,if(m^2%n==2,r=0));r} \\ Michael B. Porter, Apr 16 2010

A025022 Numbers whose least quadratic nonresidue (A020649) is 5.

Original entry on oeis.org

23, 46, 47, 73, 94, 97, 146, 167, 193, 194, 263, 313, 334, 337, 383, 386, 433, 457, 503, 526, 529, 577, 626, 647, 673, 674, 743, 766, 863, 866, 887, 914, 937, 983, 1006, 1033, 1058, 1081, 1103, 1153, 1154, 1223, 1294, 1297, 1346, 1367, 1486, 1487, 1583, 1607
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[1600], Min @ Complement[Range[# - 1], Mod[Range[#/2]^2, #]] == 5 &] (* Amiram Eldar, Oct 31 2020 *)
  • PARI
    residue(n,m)={local(r);r=0;for(i=1,floor(m/2),if(i^2%m==n,r=1));r}
    isA025022(n)=residue(2,n) && residue(3,n) && !residue(5,n) \\ Michael B. Porter, Apr 18 2010

A025023 Numbers whose least quadratic nonresidue (A020649) is 7.

Original entry on oeis.org

71, 142, 191, 239, 241, 359, 382, 409, 431, 478, 482, 599, 601, 718, 769, 818, 862, 911, 1031, 1198, 1202, 1249, 1321, 1439, 1489, 1538, 1609, 1822, 1871, 2039, 2062, 2089, 2111, 2161, 2281, 2498, 2591, 2642, 2711, 2878, 2879, 2978, 3001, 3119, 3121, 3169
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[3200], Min @ Complement[Range[# - 1], Mod[Range[#/2]^2, #]] == 7 &] (* Amiram Eldar, Oct 31 2020 *)
  • PARI
    residue(n,m)=local(r);r=0;for(i=1,floor(m/2),if(i^2%m==n,r=1));r
    isA025023(n)=residue(2,n) && residue(3,n) && residue(5,n) && !residue(7,n) \\ Michael B. Porter, Apr 19 2010
    
  • PARI
    is(n)=issquare(Mod(2,n)) && issquare(Mod(3,n)) && issquare(Mod(5,n)) && !issquare(Mod(7,n)) \\ Charles R Greathouse IV, Jan 24 2020

A025024 Numbers whose least quadratic nonresidue (A020649) is 11.

Original entry on oeis.org

311, 622, 719, 839, 1009, 1129, 1201, 1438, 1511, 1678, 1801, 2018, 2258, 2399, 2402, 2521, 3022, 3049, 3191, 3359, 3361, 3602, 3889, 4079, 4201, 4561, 4679, 4729, 4798, 4871, 5039, 5042, 5209, 5351, 5591, 5879, 5881, 6098, 6359, 6382, 6718, 6719, 6722
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[7000], Min @ Complement[Range[# - 1], Mod[Range[#/2]^2, #]] == 11 &] (* Amiram Eldar, Oct 31 2020 *)
  • PARI
    residue(n,m)=local(r);r=0;for(i=1,floor(m/2),if(i^2%m==n,r=1));r
    isA025024(n)=local(a);a=1;forprime(p=2,7,a=a && residue(p,n));a=a && !residue(11,n);a \\ Michael B. Porter, Apr 30 2010
    
  • PARI
    is(n)=issquare(Mod(2,n)) && issquare(Mod(3,n)) && issquare(Mod(5,n)) && issquare(Mod(7,n)) && !issquare(Mod(11,n)) \\ Charles R Greathouse IV, Jan 24 2020

A025025 Numbers whose least quadratic nonresidue (A020649) is 13.

Original entry on oeis.org

479, 958, 1151, 1319, 2302, 2351, 2638, 2689, 3529, 3671, 3911, 4702, 4751, 4919, 5378, 5519, 5569, 6599, 7058, 7342, 7559, 7561, 7681, 7822, 8951, 9241, 9502, 9601, 9719, 9769, 9838, 11038, 11138, 12049, 12239, 12721, 12911, 13151, 13198, 14159
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[14000], Min @ Complement[Range[# - 1], Mod[Range[#/2]^2, #]] == 13 &] (* Amiram Eldar, Oct 31 2020 *)
  • PARI
    residue(n,m)=local(r);r=0;for(i=1,floor(m/2),if(i^2%m==n,r=1));r
    isA025025(n)=local(a);a=1;forprime(p=2,11,a=a && residue(p,n));a=a && !residue(13,n);a \\ Michael B. Porter, Apr 30 2010
    
  • PARI
    is(n)=issquare(Mod(2,n)) && issquare(Mod(3,n)) && issquare(Mod(5,n)) && issquare(Mod(7,n)) && issquare(Mod(11,n)) && !issquare(Mod(13,n)) \\ Charles R Greathouse IV, Jan 24 2020

A025026 Numbers whose least quadratic nonresidue (A020649) is 17.

Original entry on oeis.org

1559, 2999, 3118, 5998, 6551, 8089, 8761, 13102, 13729, 14759, 16178, 16631, 17522, 18119, 19009, 21121, 21961, 23399, 24049, 27431, 27458, 27551, 28081, 29518, 31249, 33262, 33289, 33479, 35281, 35591, 36238, 36791, 38018, 42242, 43391, 43922, 43991
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[20000], Min @ Complement[Range[# - 1], Mod[Range[#/2]^2, #]] == 17 &] (* Amiram Eldar, Oct 31 2020 *)
  • PARI
    residue(n,m)=local(r);r=0;for(i=1,floor(m/2),if(i^2%m==n,r=1));r
    isA025026(n)={local(a);a=1;forprime(p=2,13,a=a && residue(p,n));a=a && !residue(17,n);a} \\ Michael B. Porter, Apr 30 2010
    
  • PARI
    is(n)=issquare(Mod(2,n)) && issquare(Mod(3,n)) && issquare(Mod(5,n)) && issquare(Mod(7,n)) && issquare(Mod(11,n)) && issquare(Mod(13,n)) && !issquare(Mod(17,n)) \\ Charles R Greathouse IV, Jan 24 2020

A025027 Numbers whose least quadratic nonresidue (A020649) is 19.

Original entry on oeis.org

5711, 9239, 10391, 10799, 11422, 14951, 18478, 20782, 21598, 29902, 33049, 34319, 36599, 37489, 40031, 42719, 44641, 49009, 49921, 51769, 53089, 55441, 57119, 59929, 61151, 61871, 63361, 66098, 67369, 67679, 68638, 69001, 71569, 73198, 74978, 75479
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[20000], Min @ Complement[Range[# - 1], Mod[Range[#/2]^2, #]] == 19 &] (* Amiram Eldar, Oct 31 2020 *)
  • PARI
    residue(n,m)=local(r);r=0;for(i=1,floor(m/2),if(i^2%m==n,r=1));r
    isA025027(n)=local(a);a=1;forprime(p=2,17,a=a && residue(p,n));a=a && !residue(19,n);a \\ Michael B. Porter, Apr 30 2010
    
  • PARI
    is(n)=forprime(p=2,19, if(!issquare(Mod(p,n)), return(p==19))); 0 \\ Charles R Greathouse IV, Jan 24 2020

A025028 Numbers whose least quadratic nonresidue (A020649) is 23.

Original entry on oeis.org

10559, 15791, 21118, 31582, 50951, 53231, 53881, 88079, 88919, 92569, 97919, 101902, 102001, 106462, 107762, 123191, 128519, 130729, 138311, 142271, 144169, 158759, 166319, 166609, 167879, 173209, 174599, 176158, 176401, 177838, 185138
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    residue(n,m)=local(r);r=0;for(i=1,floor(m/2),if(i^2%m==n,r=1));r
    isA025028(n)=local(a);a=1;forprime(p=2,19,a=a && residue(p,n));a=a && !residue(23,n);a \\ Michael B. Porter, Apr 30 2010
    
  • PARI
    is(n)=forprime(p=2,23, if(!issquare(Mod(p,n)), return(p==23))); 0 \\ Charles R Greathouse IV, Jan 24 2020

A025029 Numbers whose least quadratic nonresidue (A020649) is 29.

Original entry on oeis.org

18191, 35279, 36382, 38639, 63839, 70558, 77278, 87481, 95471, 104711, 127678, 147671, 174962, 185641, 190942, 193751, 199559, 209422, 217439, 284231, 290351, 295342, 312311, 322559, 336361, 363359, 371282, 375359, 387502, 394969, 399118
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    residue(n,m)=local(r);r=0;for(i=0,floor(m/2),if(i^2%m==n,r=1));r
    isA025029(n)=local(a);a=1;forprime(p=2,23,a=a && residue(p,n));a=a && !residue(29,n);a \\ Michael B. Porter, May 06 2010
    
  • PARI
    is(n)=forprime(p=2,29, if(!issquare(Mod(p,n)), return(p==29))); 0 \\ Charles R Greathouse IV, Jan 24 2020
Showing 1-10 of 10 results.