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 12 results. Next

A057759 Least nonnegative square root of 3 mod n for n in A057125.

Original entry on oeis.org

0, 1, 0, 3, 5, 4, 5, 7, 9, 6, 15, 9, 7, 12, 11, 8, 27, 30, 28, 21, 15, 9, 13, 35, 10, 18, 49, 15, 11, 27, 53, 38, 39, 12, 43, 17, 21, 72, 13, 62, 61, 48, 19, 33, 69, 24, 14, 87, 99, 89, 49, 21, 15, 50, 71, 106, 56, 27, 96, 76, 16, 93, 23, 130
Offset: 1

Views

Author

N. J. A. Sloane, Nov 01 2000

Keywords

Crossrefs

Cf. A057125.

Programs

  • Mathematica
    A057125 = Prepend[ Select[ Range[300], Reduce[ Mod[3 - k^2, #] == 0, k, Integers] =!= False &], 1]; a[n_] := Min[ r /. {ToRules[ Reduce[ Mod[r^2 - 3, A057125[[n]]] == 0, r, Integers] /. C[1] -> 0]}]; a[1] = 0; Table[a[n], {n, 1, 64}] (* Jean-François Alcover, Sep 20 2012 *)

Extensions

Corrected by T. D. Noe, Apr 19 2007 [The errors were caused by the faulty Maple command "mroot"]

A057758 Duplicate of A057125.

Original entry on oeis.org

1, 2, 3, 6, 11, 13, 22, 23, 26, 33, 37, 39, 46, 47, 59, 61, 66, 69, 71, 73, 74, 78, 83
Offset: 1

Views

Author

Keywords

A057126 Numbers k such that 2 is a square mod k.

Original entry on oeis.org

1, 2, 7, 14, 17, 23, 31, 34, 41, 46, 47, 49, 62, 71, 73, 79, 82, 89, 94, 97, 98, 103, 113, 119, 127, 137, 142, 146, 151, 158, 161, 167, 178, 191, 193, 194, 199, 206, 217, 223, 226, 233, 238, 239, 241, 254, 257, 263, 271, 274, 281, 287, 289, 302, 311, 313, 322
Offset: 1

Views

Author

Henry Bottomley, Aug 10 2000

Keywords

Comments

Numbers that are not multiples of 4 and for which all odd prime factors are congruent to +/- 1 mod 8. - Eric M. Schmidt, Apr 20 2013
Apparently the same as the list of numbers primitively represented by the indefinite quadratic form x^2 - 2y^2 (cf. A035251). - N. J. A. Sloane, Jun 11 2014
From Wolfdieter Lang, Jul 11 2025: (Start)
Also the negative sequence lists the numbers properly represented by the indefinite quadratic form x^2 - 2*y^2 of discriminant 4*2 = 8. For the proof see the W. Lang paper linked in A385449, Lemma 18, pp. 22-23.
The connection between the proper positive fundamental solutions (X, Y) of X^2 - 2*Y^2 = -a(n), given in A385449, and the solutions (x, y) of x^2 - 2*y^2 = a(n) is (x, y) = (2*Y - X, X - Y). If y becomes nonpositive a transformation with the matrix Mat([3,4], [2,3]) will give the positive proper fundamental solution. See the example section of A385449. See also the Nov 09 2009 comment in A035251 by Franklin T. Adams-Watters for this connection, and for the matrix eq. (38) p. 14 of the mentioned linked paper.
Therefore the previous statement on the representation of a(n) is true.(End)

Crossrefs

Includes the primes in A038873 and these (primes congruent to {1, 2, 7} mod 8) are the prime factors of the terms in this sequence.
Cf. A087780 (number of solutions mod n).

Programs

  • Maple
    with(numtheory); [seq(mroot(2,2,p),p=1..300)];
  • Mathematica
    ok[n_] := Reduce[ Mod[2 - k^2, n] == 0, k, Integers] =!= False; Prepend[ Select[ Range[400], ok], 1] (* Jean-François Alcover, Sep 20 2012 *)
  • PARI
    isok(n) = issquare(Mod(2,n)); \\ Michel Marcus, Feb 19 2016

Extensions

Checked by T. D. Noe, Apr 19 2007

A057127 -2 is a square mod n.

Original entry on oeis.org

1, 2, 3, 6, 9, 11, 17, 18, 19, 22, 27, 33, 34, 38, 41, 43, 51, 54, 57, 59, 66, 67, 73, 81, 82, 83, 86, 89, 97, 99, 102, 107, 113, 114, 118, 121, 123, 129, 131, 134, 137, 139, 146, 153, 162, 163, 166, 171, 177, 178, 179, 187, 193, 194, 198, 201, 209, 211, 214, 219
Offset: 1

Views

Author

Henry Bottomley, Aug 10 2000

Keywords

Comments

Includes the primes in A033203 and these (primes congruent to {1, 2, 3} mod 8) are the prime factors of the terms in this sequence.
Numbers that are not multiples of 4 and for which all odd prime factors are congruent to {1, 3} mod 8. - Eric M. Schmidt, Apr 21 2013
Positive integers primitively represented by x^2 + 2y^2. - Ray Chandler, Jul 22 2014
The set of the divisors of numbers of the form k^2+2. - Michel Lagneau, Jun 28 2015
The number of proper solutions (x, y) with nonnegative x of the positive definite primitive quadratic form x^2 + 2*y*2 (discriminant -8) representing a(n) is 1 for n = 1 and for n >= 2 it is 2^(P_1 + P_3), where P_1 and P_3 are the number of distinct prime divisors of a(n) congruent to 1 and 3 modulo 8, respectively. See the above comments on A033203 and this binary form. - Wolfdieter Lang, Feb 25 2021

Examples

			Binary quadratic form x^2 + 2*y^2 representing a(n), with x >= 0: a(1) = 1: one solution (x, y) = (1,0); a(2) = 2: one solution (0,1); a(3) = 3: two solutions (1, pm 1), with pm = +1 or -1; a(5) = 9 = 3^2: two solutions (1, pm 2); a(12) = 33 = 3*11: 4 solutions (1, pm 4) and (5, pm 2); a(137) = 3*11*17 = 561: eight solutions (7, pm 16), (13, pm 14), (19, pm 10) and (23, pm 4). - _Wolfdieter Lang_, Feb 25 2021
		

Crossrefs

Programs

  • Maple
    select(n -> numtheory:-msqrt(-2,n) <> FAIL, [$1..1000]); # Robert Israel, Jun 29 2015
  • Mathematica
    Select[Range[300], IntegerQ[PowerMod[-2, 1/2, #]]&] // Quiet (* Jean-François Alcover, Mar 04 2019 *)
  • PARI
    isok(n) = issquare(Mod(-2, n)); \\ Michel Marcus, Jun 28 2015
  • Sage
    def isA057127(n):
        if n % 4 == 0: return False
        return all(p % 8 in [1, 2, 3] for p, _ in factor(n))
    [n for n in range(1, 300) if isA057127(n)]
    # Eric M. Schmidt, Apr 21 2013
    

A038874 Primes p such that 3 is a square mod p.

Original entry on oeis.org

2, 3, 11, 13, 23, 37, 47, 59, 61, 71, 73, 83, 97, 107, 109, 131, 157, 167, 179, 181, 191, 193, 227, 229, 239, 241, 251, 263, 277, 311, 313, 337, 347, 349, 359, 373, 383, 397, 409, 419, 421, 431, 433, 443, 457, 467, 479, 491, 503, 541, 563, 577, 587, 599, 601
Offset: 1

Views

Author

Keywords

Comments

Also primes congruent to {1, 2, 3, 11} mod 12.
The subsequence p = 1 (mod 4) corresponds to A068228 and only these entries of a(n) are squares mod 3 (from the quadratic reciprocity law). - Lekraj Beedassy, Jul 21 2004
Largest prime factors of n^2 - 3. - Vladimir Joseph Stephan Orlovsky, Aug 12 2009
Aside from 2 and 3, primes p such that Legendre(3, p) = 1. Bolker asserts there are infinitely many of these primes. - Alonso del Arte, Nov 25 2015
The associated bases of the squares are 1, 0, 5, 4, 7, 15, 12, 11, 8, 28, 21, 13...: 1^2 = 3 -1*2, 0^2 = 3-1*3, 5^2 = 3+ 2*11, 4^2 = 3+1*13, 7^2 = 3+2*23, 15^2 = 3+6*37, 12^2 = 3+3*47,... - R. J. Mathar, Feb 23 2017

Examples

			11 is in the sequence since the equation x^2 - 11y = 3 has solutions, such as x = 5, y = 2.
13 is in the sequence since the equation x^2 - 13y = 3 has solutions, such as x = 4, y = 1.
17 is not in the sequence because x^2 - 17y = 3 has no solutions in integers; Legendre(3, 17) = -1.
		

References

  • Ethan D. Bolker, Elementary Number Theory: An Algebraic Approach. Mineola, New York: Dover Publications (1969, reprinted 2007): p. 74, Theorem 25.3.

Crossrefs

If the first two terms are omitted we get A097933. A040101 is another sequence.

Programs

  • Magma
    [p: p in PrimesUpTo(1200) | p mod 12 in [1, 2, 3, 11]]; // Vincenzo Librandi, Aug 08 2012
    
  • Maple
    select(isprime, [2,3, seq(seq(6+s+12*i, s=[-5,5]),i=0..1000)]); # Robert Israel, Dec 23 2015
  • Mathematica
    Select[Prime[Range[250]], MemberQ[{1, 2, 3, 11}, Mod[#, 12]] &] (* Vincenzo Librandi, Aug 08 2012 *)
    Select[Flatten[Join[{2, 3}, Table[{12n - 1, 12n + 1}, {n, 50}]]], PrimeQ] (* Alonso del Arte, Nov 25 2015 *)
  • PARI
    forprime(p=2, 1e3, if(issquare(Mod(3, p)), print1(p , ", "))) \\ Altug Alkan, Dec 04 2015

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, Nov 29 2016

Extensions

More terms from Henry Bottomley, Aug 10 2000

A057128 Numbers n such that -3 is a square mod n.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 12, 13, 14, 19, 21, 26, 28, 31, 37, 38, 39, 42, 43, 49, 52, 57, 61, 62, 67, 73, 74, 76, 78, 79, 84, 86, 91, 93, 97, 98, 103, 109, 111, 114, 122, 124, 127, 129, 133, 134, 139, 146, 147, 148, 151, 156, 157, 158, 163, 169, 172, 181, 182, 183, 186, 193
Offset: 1

Views

Author

Henry Bottomley, Aug 10 2000

Keywords

Comments

The fact that there are no numbers in this sequence of the form 6k+5 leads to the result that all prime factors of central polygonal numbers (A002061 of the form n^2-n+1) are either 3 or of the form 6k+1. This in turn leads to there being an infinite number of primes of the form 6k+1, since if P=product[all known primes of form 6k+1] then all the prime factors of 9P^2-3P+1 must be unknown primes of form 6k+1.
Numbers that are not multiples of 8 or 9 and for which all prime factors greater than 3 are congruent to 1 mod 6. - Eric M. Schmidt, Apr 21 2013
Numbers that divide at least some member of A117950. - Robert Israel, Feb 19 2016

Examples

			a(7)=13 since -3 mod 13=10 mod 13=6^2 mod 13.
		

Crossrefs

Includes the primes in A045331 and these (primes congruent to {1, 2, 3} mod 6) are the prime factors of the terms in this sequence. Cf. A008784, A057125, A057126, A057127, A057129.
Cf. A117950.

Programs

  • Maple
    select(t -> numtheory:-quadres(-3,t) = 1, {$1..1000}); # Robert Israel, Feb 19 2016
  • Mathematica
    Select[Range[200], IntegerQ[PowerMod[-3, 1/2, #]]&] // Quiet (* Jean-François Alcover, Mar 05 2019 *)
  • PARI
    isok(n) = issquare(Mod(-3,n)); \\ Michel Marcus, Feb 19 2016
  • Sage
    def A057128(n) :
        if n%8==0 or n%9==0: return False
        for (p, m) in factor(n) :
            if p % 6 not in [1, 2, 3] : return False
            return True
    # Eric M. Schmidt, Apr 21 2013
    

A057129 -4 is a square mod n.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 13, 17, 20, 25, 26, 29, 34, 37, 40, 41, 50, 52, 53, 58, 61, 65, 68, 73, 74, 82, 85, 89, 97, 100, 101, 104, 106, 109, 113, 116, 122, 125, 130, 136, 137, 145, 146, 148, 149, 157, 164, 169, 170, 173, 178, 181, 185, 193, 194, 197, 200, 202, 205, 212
Offset: 1

Views

Author

Henry Bottomley, Aug 10 2000

Keywords

Comments

Numbers that are not multiples of 16 and for which all odd prime factors are congruent to 1 mod 4. - Eric M. Schmidt, Apr 21 2013

Crossrefs

Includes the primes in A002313 and these (primes congruent to {1, 2} mod 4) are the prime factors of the terms in this sequence. Cf. A008784, A057125, A057126, A057127, A057128.

Programs

  • Mathematica
    Select[Range[100], IntegerQ[PowerMod[-4, 1/2, #]] &] // Quiet (* After Jean-François Alcover *) (* Robert Price, Apr 19 2025 *)
  • Sage
    def A057129(n) :
        if n%16==0: return False
        for (p, m) in factor(n) :
            if p % 4 not in [1, 2] : return False
        return True
    # Eric M. Schmidt, Apr 21 2013

A057762 Numbers k such that 5 is a square mod k.

Original entry on oeis.org

1, 2, 4, 5, 10, 11, 19, 20, 22, 29, 31, 38, 41, 44, 55, 58, 59, 61, 62, 71, 76, 79, 82, 89, 95, 101, 109, 110, 116, 118, 121, 122, 124, 131, 139, 142, 145, 149, 151, 155, 158, 164, 178, 179, 181, 190, 191, 199, 202, 205, 209, 211, 218, 220, 229
Offset: 1

Views

Author

N. J. A. Sloane, Nov 01 2000

Keywords

Comments

Numbers not divisible by 3, 8, or 25 and whose prime factors > 5 are congruent to +/- 1 mod 5. - Eric M. Schmidt, Jan 24 2014

Crossrefs

Programs

  • Maple
    with(numtheory); [seq(mroot(5,2,p),p=1..400)];
  • Mathematica
    Prepend[ Select[ Range[300], Reduce[ Mod[5 - k^2, #] == 0, k, Integers] =!= False &], 1] (* Jean-François Alcover, Sep 20 2012 *)
    Join[{1, 2, 4, 5}, Select[Range[6, 300], MemberQ[Mod[Range[#]^2, #], 5] &]] (* T. D. Noe, Sep 20 2012 *)

A262931 Numbers k such that 6 is a square mod k.

Original entry on oeis.org

1, 2, 3, 5, 6, 10, 15, 19, 23, 25, 29, 30, 38, 43, 46, 47, 50, 53, 57, 58, 67, 69, 71, 73, 75, 86, 87, 94, 95, 97, 101, 106, 114, 115, 125, 129, 134, 138, 139, 141, 142, 145, 146, 149, 150, 159, 163, 167, 173, 174, 190, 191, 193, 194, 197, 201, 202, 211, 213
Offset: 1

Views

Author

Erik Pelttari, Oct 04 2015

Keywords

Examples

			6^2 == 6 (mod 15), so 15 is a term.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..300] | exists(t){x : x in ResidueClassRing(n) | x^2 eq 6}]; // Vincenzo Librandi, Oct 05 2015
  • Maple
    with(numtheory):
    a:= proc(n) option remember; local k;
          for k from 1+`if`(n=1, 0, a(n-1))
          while mroot(6, 2, k)=FAIL do od; k
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, Feb 24 2017
  • Mathematica
    Join[{1}, Table[If[Reduce[x^2 == 6, Modulus->n] === False, Null, n], {n, 2, 300}]//Union] (* Vincenzo Librandi, Oct 05 2015 *)
  • PARI
    for(n=1, 300, if (issquare(Mod(6, n)), print1(n", "))); \\ Altug Alkan, Oct 04 2015
    

A262932 Numbers k such that 7 is a square mod k.

Original entry on oeis.org

1, 2, 3, 6, 7, 9, 14, 18, 19, 21, 27, 29, 31, 37, 38, 42, 47, 53, 54, 57, 58, 59, 62, 63, 74, 81, 83, 87, 93, 94, 103, 106, 109, 111, 113, 114, 118, 126, 131, 133, 137, 139, 141, 149, 159, 162, 166, 167, 171, 174, 177, 186, 189, 193, 197, 199, 203, 206, 217, 218, 222
Offset: 1

Views

Author

Erik Pelttari, Oct 04 2015

Keywords

Examples

			7^2 == 7 (mod 14), so 14 is a term.
5^2 == 7 (mod 18) and 13^2 == 7 (mod 18), so 18 is a term.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..300] | exists(t){x : x in ResidueClassRing(n) | x^2 eq 7}]; // Vincenzo Librandi, Oct 05 2015
  • Maple
    with(numtheory):
    a:= proc(n) option remember; local k;
          for k from 1+`if`(n=1, 0, a(n-1))
          while mroot(7, 2, k)=FAIL do od; k
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, Feb 24 2017
  • Mathematica
    Join[{1}, Table[If[Reduce[x^2 == 7, Modulus->n] === False, Null, n], {n, 2, 300}]//Union] (* Vincenzo Librandi, Oct 05 2015 *)
  • PARI
    for(n=1, 300, if (issquare(Mod(7, n)), print1(n", "))); \\ Altug Alkan, Oct 04 2015
    
Showing 1-10 of 12 results. Next