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.

A057125 Numbers n such that 3 is a square mod n.

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, 94, 97, 107, 109, 111, 118, 121, 122, 131, 138, 141, 142, 143, 146, 157, 166, 167, 169, 177, 179, 181, 183, 191, 193, 194, 213, 214, 218, 219, 222, 227, 229, 239, 241, 242
Offset: 1

Views

Author

Henry Bottomley, Aug 10 2000

Keywords

Comments

Numbers that are not multiples of 4 or 9 and for which all prime factors greater than 3 are congruent to +/- 1 mod 12. - Eric M. Schmidt, Apr 21 2013

Examples

			3^2==3 (mod 6), so 6 is a member.
		

Crossrefs

Includes the primes in A038874 and these (primes congruent to {1, 2, 3, 11} mod 12) are the prime factors of the terms in this sequence. Cf. A008784, A057126, A057127, A057128, A057129.
Cf. A057759.

Programs

  • Magma
    [n: n in [1..300] | exists(t){x : x in ResidueClassRing(n) | x^2 eq 3}]; // Vincenzo Librandi, Feb 20 2016
  • Maple
    # Beware: Since 2007 at least and up to Maple 16 at least, the following Maple code returns the wrong answer for n = 6:
    with(numtheory): [seq(`if`(mroot(3,2,n)=FAIL,NULL,n), n=1..400)];
    # second Maple program:
    with(numtheory): mroot(3, 2, 6):=3:
    a:= proc(n) option remember; local m;
          for m from 1+`if`(n=1, 0, a(n-1))
          while mroot(3, 2, m)=FAIL do od; m
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, Feb 24 2017
  • Mathematica
    Prepend[ Select[ Range[300], Reduce[Mod[3 - k^2, #] == 0, k, Integers] =!= False &], 1]  (* Jean-François Alcover, Sep 20 2012 *)
  • PARI
    isok(n) = issquare(Mod(3,n)); \\ Michel Marcus, Feb 19 2016
    

Extensions

Edited by N. J. A. Sloane, Oct 25 2008 at the suggestion of R. J. Mathar.