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

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

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.

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

A034030 Imprimitively represented by x^2+2y^2.

Original entry on oeis.org

0, 4, 8, 9, 12, 16, 18, 24, 25, 27, 32, 36, 44, 48, 49, 50, 54, 64, 68, 72, 75, 76, 81, 88, 96, 98, 99, 100, 108, 121, 128, 132, 136, 144, 147, 150, 152, 153, 162, 164, 169, 171, 172, 176, 192, 196, 198, 200, 204, 216, 225, 228
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    # Maple code for A002479, A057127, A034030-A034034 from N. J. A. Sloane, Apr 30 2015
    lis:={}; lisP:={}; lisI:={};
    M:=50; M2:=M^2;
    for x from 0 to M do
       x2:=x^2;
    for y from 0 to M do
       N:=x2+2*y^2;
    if N <= M2 then
       if gcd(x,y) = 1 then lisP:={op(lisP),N}; else lisI:={op(lisI),N} fi;
       lis:={op(lis),N};
    fi;
    od: od:
    lprint("lis");
    Lis:=sort(convert(lis,list));
    lprint("lisP");
    LisP:=sort(convert(lisP,list));
    lprint("lisI");
    LisI:=sort(convert(lisI,list));
    lprint("lisPnotI");
    LisPnotI:=sort(convert(lisP minus lisI, list));
    lprint("lisInotP");
    LisInotP:=sort(convert(lisI minus lisP,list));
    lprint("lisIandP");
    LisIandP:=sort(convert(lisI intersect lisP,list));
    lprint("liseither");
    Liseither:=sort(convert(lis minus (lisI intersect lisP),list));

Extensions

Corrected by N. J. A. Sloane, Apr 30 2015

A034034 Numbers that are primitively or imprimitively represented by x^2+2y^2, but not both.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 8, 11, 12, 16, 17, 19, 22, 24, 25, 32, 33, 34, 36, 38, 41, 43, 44, 48, 49, 50, 51, 57, 59, 64, 66, 67, 68, 72, 73, 75, 76, 82, 83, 86, 88, 89, 96, 97, 98, 100, 102, 107, 108, 113, 114, 118, 123, 128, 129, 131
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

Corrected by N. J. A. Sloane, Apr 30 2015

A034031 Numbers that are primitively but not imprimitively represented by x^2+2y^2.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Extensions

Corrected by N. J. A. Sloane, Apr 30 2015

A034033 Both primitively and imprimitively represented by x^2+2y^2.

Original entry on oeis.org

9, 18, 27, 54, 81, 99, 121, 153, 162, 171, 198, 242, 243, 289, 297, 306, 342, 361, 363, 369, 387, 459, 486, 513, 531, 578, 594, 603, 657, 722, 726, 729, 738, 747, 774, 801, 867, 873, 891, 918, 963, 1017, 1026, 1062, 1083, 1089
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

Corrected by N. J. A. Sloane, Apr 30 2015

A034029 Numbers that are primitively represented by (x^2+2y^2 with x >= y >= 0).

Original entry on oeis.org

1, 3, 6, 11, 17, 18, 27, 33, 34, 38, 43, 51, 57, 66, 67, 81, 82, 83, 86, 89, 99, 102, 113, 114, 118, 121, 123, 129, 131, 139, 146, 153, 162, 171, 177, 179, 187, 193, 194, 198, 201, 209, 214, 219, 227, 233, 241, 242, 246, 249, 257, 258, 262, 267
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

Definition corrected by N. J. A. Sloane, Apr 30 2015

A034032 Imprimitively but not primitively represented by x^2+2y^2.

Original entry on oeis.org

0, 4, 8, 12, 16, 24, 25, 32, 36, 44, 48, 49, 50, 64, 68, 72, 75, 76, 88, 96, 98, 100, 108, 128, 132, 136, 144, 147, 150, 152, 164, 169, 172, 176, 192, 196, 200, 204, 216, 225, 228, 236, 256, 264, 268, 272, 275, 288, 292, 294
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

Corrected by N. J. A. Sloane, Apr 30 2015
Showing 1-10 of 11 results. Next