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.

Previous Showing 21-30 of 49 results. Next

A010411 Squares mod 50.

Original entry on oeis.org

0, 1, 4, 6, 9, 11, 14, 16, 19, 21, 24, 25, 26, 29, 31, 34, 36, 39, 41, 44, 46, 49
Offset: 1

Views

Author

Keywords

Crossrefs

Row 50 of A096008.
Cf. A028763.

Programs

  • Magma
    [ n: n in [0..49] | IsSquare(R! n) where R:= ResidueClassRing(50)]; // Vincenzo Librandi, Dec 28 2019
  • Mathematica
    Union[PowerMod[Range[50], 2, 50]]
  • Sage
    [quadratic_residues(50)] # Zerinvary Lajos, May 24 2009
    
  • Scala
    (1 to 50).map(n => (n * n) % 50).toSet.toSeq.sorted // Alonso del Arte, Dec 25 2019
    

A037046 Numbers that are not the number of quadratic residues mod n for any n.

Original entry on oeis.org

5, 13, 17, 25, 26, 29, 35, 39, 41, 43, 47, 50, 58, 59, 61, 65, 67, 71, 73, 78, 83, 85, 86, 89, 94, 95, 101, 103, 107, 109, 113, 116, 118, 119, 122, 123, 125, 127, 130, 131, 134, 143, 145, 146, 149, 155, 163, 167, 170, 173, 178, 179, 181, 183, 185, 188, 191, 193
Offset: 1

Views

Author

Keywords

Comments

Complement of A037041. - Michel Marcus, Nov 11 2015

Crossrefs

Cf. A000224, A096008, A111986 (number of numbers having n quadratic residues), A111987 (least number having n quadratic residues), A111988 (greatest number having n quadratic residues).

Programs

  • Mathematica
    s = Length[Union@ #] & /@ Table[Mod[k^2, n], {n, 10000}, {k, 0, n - 1}]; Complement[Range@ Max@ #, #] &@ Take[Union@ s, 136] (* Michael De Vlieger, Nov 10 2015 *)

A260191 Numbers m such that there exists no square whose base-m digit sum is binomial(m,2).

Original entry on oeis.org

3, 5, 13, 17, 21, 29, 37, 45, 49, 53, 61, 65, 69, 77, 81, 85, 93, 101, 109, 113, 117, 125, 133, 141, 145, 149, 157, 165, 173, 177, 181, 189, 193, 197, 205, 209, 213, 221, 229, 237, 241, 245, 253, 257, 261, 269, 273, 277, 285, 293, 301, 305, 309, 317, 321, 325
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 18 2015

Keywords

Comments

After the initial term a(1)=3 (see Example), this sequence consists of all numbers of the form (2j-1)*4^k+1 where j and k are positive integers.
For each term m > 3, no square has a base-m digit sum == binomial(m,2) (mod 4).
After the initial term a(1)=3, is this A249034?

Examples

			No square has a base-3 digit sum of exactly binomial(3,2)=3, so 3 is in the sequence.
Binomial(5,2) = 10 == 2 (mod 4), but no square has a base-5 digit sum == 2 (mod 4), so there cannot be a square whose base-5 digit sum is 10; thus, 5 is in the sequence.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def A260191_gen(startvalue=3): # generator of terms >= startvalue
        c = max(startvalue,3)
        if c<=3: yield 3
        for n in count(c+(c&1^1),2):
            if (~(m:=n-1>>1) & m-1).bit_length()&1:
                yield n
    A260191_list = list(islice(A260191_gen(),20)) # Chai Wah Wu, Feb 26 2024

A330279 Numbers k such that x^k == k (mod k + 1) has multiple solutions for 0 <= x < k.

Original entry on oeis.org

27, 51, 65, 69, 75, 111, 123, 129, 147, 153, 171, 175, 185, 189, 195, 207, 231, 237, 243, 245, 267, 275, 279, 285, 291, 303, 309, 315, 321, 343, 363, 365, 369, 387, 395, 405, 411, 417, 425, 429, 435, 441, 447, 489, 495, 505, 507, 519, 531, 555, 567, 573, 591, 597
Offset: 1

Views

Author

Christopher Cormier, Dec 09 2019

Keywords

Comments

All odd numbers have k^k == k (mod k + 1), but only some have other solutions in the least residue system (e.g. 3^27 and 19^27 == 27 (mod 28)).
Odd numbers k such that k and A000010(k+1) are not coprime. - Robert Israel, Jul 30 2023

Examples

			27 is in the list because x^27 == 27 (mod 28) has three solutions: 3, 19, and 27.
		

Crossrefs

Programs

  • Maple
    select(t -> igcd(t,numtheory:-phi(t+1))>1, [seq(i,i=1..1000,2)]); # Robert Israel, Jul 30 2023
  • Mathematica
    ok[k_] := Length[Select[Range[0, k-1], PowerMod[#, k, k + 1] == k &, 2]] > 1; Select[ Range@ 600, ok] (* Giovanni Resta, Dec 10 2019 *)
  • PARI
    isok(k) = sum(i=0, k-1, Mod(i, k+1)^k == k) > 1; \\ Michel Marcus, Dec 10 2019

A010410 Squares mod 49.

Original entry on oeis.org

0, 1, 2, 4, 8, 9, 11, 15, 16, 18, 22, 23, 25, 29, 30, 32, 36, 37, 39, 43, 44, 46
Offset: 1

Views

Author

Keywords

Crossrefs

Row 49 of A096008.

Programs

  • Mathematica
    Union[PowerMod[Range[49], 2, 49]] (* Alonso del Arte, Jan 07 2020 *)
  • Sage
    [quadratic_residues(49)] # Zerinvary Lajos, May 24 2009
    
  • Scala
    (1 to 49).map(n => n * n % 49).toSet.toSeq.sorted // Alonso del Arte, Jan 07 2020

Formula

a(n) = a(n-1) + a(n-3) - a(n-4) for 5 < n <= 22. - Chai Wah Wu, Jan 30 2018

A010419 Squares mod 58.

Original entry on oeis.org

0, 1, 4, 5, 6, 7, 9, 13, 16, 20, 22, 23, 24, 25, 28, 29, 30, 33, 34, 35, 36, 38, 42, 45, 49, 51, 52, 53, 54, 57
Offset: 1

Views

Author

Keywords

Crossrefs

Row 58 of A096008.

Programs

A010423 Squares mod 62.

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 9, 10, 14, 16, 18, 19, 20, 25, 28, 31, 32, 33, 35, 36, 38, 39, 40, 41, 45, 47, 49, 50, 51, 56, 59
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A010392, A028775, A096008 (row 62).

Programs

  • Mathematica
    Union[PowerMod[Range[62], 2, 62]] (* Alonso del Arte, Dec 31 2019 *)
  • Sage
    [quadratic_residues(62)] # Zerinvary Lajos, May 24 2009
    
  • Scala
    (1 to 62).map(n => n * n % 62).toSet.toSeq.sorted // Alonso del Arte, Dec 31 2019

A010427 Squares mod 66.

Original entry on oeis.org

0, 1, 3, 4, 9, 12, 15, 16, 22, 25, 27, 31, 33, 34, 36, 37, 42, 45, 48, 49, 55, 58, 60, 64
Offset: 1

Views

Author

Keywords

Crossrefs

Row 66 of A096008.
Cf. A028779.

Programs

  • Mathematica
    Union[PowerMod[Range[66], 2, 66]] (* Alonso del Arte, Dec 22 2019 *)
  • Sage
    [quadratic_residues(66)] # Zerinvary Lajos, May 24 2009
    
  • Scala
    (1 to 66).map(n => (n * n) % 66).toSet.toSeq.sorted // Alonso del Arte, Dec 22 2019

A316975 a(n) is the minimum number of occurrences of the same value (r0-r1+n) mod n for all pairs (r0,r1) of quadratic residues mod n.

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 3, 1, 3, 4, 1, 1, 4, 2, 5, 1, 2, 6, 6, 1, 2, 6, 2, 2, 7, 2, 8, 1, 3, 8, 2, 1, 9, 10, 3, 1, 10, 4, 11, 3, 1, 12, 12, 1, 8, 4, 4, 3, 13, 4, 3, 2, 5, 14, 15, 1, 15, 16, 2, 1, 3, 6, 17, 4, 6, 4, 18, 1, 18, 18, 2, 5, 6, 6, 20, 1, 4, 20
Offset: 1

Views

Author

Arnauld Chevallier, Jul 17 2018

Keywords

Comments

Multiplicative by the Chinese remainder theorem since if gcd(m,n) = 1 then r is a quadratic residue mod m*n iff it is a quadratic residue mod m and a quadratic residue mod n. - Andrew Howroyd, Aug 07 2018

Examples

			The quadratic residues mod 10 are 0, 1, 4, 5, 6 and 9. For each pair (r0,r1) of these quadratic residues, we compute (r0-r1+10) mod 10, leading to:
      0 1 4 5 6 9
    +------------
  0 | 0 9 6 5 4 1
  1 | 1 0 7 6 5 2
  4 | 4 3 0 9 8 5
  5 | 5 4 1 0 9 6
  6 | 6 5 2 1 0 7
  9 | 9 8 5 4 3 0
The minimum number of occurrences of the same value in the above table is 2 (for 2, 3, 7 and 8). Therefore a(10) = 2.
		

Crossrefs

Cf. A096008.

Programs

  • Mathematica
    Table[Min@ Tally[#][[All, -1]] &@ Flatten[Mod[#, n] & /@ Outer[Subtract, #, #]] &@ Union@ PowerMod[Range@ n, 2, n], {n, 82}] (* Michael De Vlieger, Jul 20 2018 *)
  • PARI
    a(n)={my(r=Set(vector(n,i,i^2%n))); my(v=vector(n)); for(i=1, #r, for(j=1, #r, v[(r[i]-r[j])%n + 1]++)); vecmin(select(t->t>0, v))} \\ Andrew Howroyd, Aug 07 2018

A381348 Irregular triangle read by rows in which row n lists the largest subset of Z/nZ fixed by x -> x^2.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 3, 4, 0, 1, 2, 4, 0, 1, 0, 1, 4, 7, 0, 1, 5, 6, 0, 1, 3, 4, 5, 9, 0, 1, 4, 9, 0, 1, 3, 9, 0, 1, 2, 4, 7, 8, 9, 11, 0, 1, 6, 10, 0, 1, 0, 1, 0, 1, 4, 7, 9, 10, 13, 16, 0, 1, 4, 5, 6, 7, 9, 11, 16, 17, 0, 1, 5, 16, 0, 1, 4, 7, 9, 15, 16, 18
Offset: 1

Views

Author

Aloe Poliszuk, Feb 20 2025

Keywords

Comments

Row n has length A277847(n).
Repeated squaring (application of f: x -> x^2) of the set of integers mod n results in a set that is fixed under f. Row n lists this set for modulus n. The number of applications of f to reach this fixed set is A309414(n).
Equivalently, row n lists the set of elements x such that, for some k, x^(2^k) == x (mod n), i.e. those x which are part of a cycle under x -> x^2 mod n.
For prime p of the form 4k + 3 (A002145), row p gives exactly the set of quadratic residues mod p. As such, row p has (p + 1) / 2 elements.
When n is a prime power (A000961) the product of row n (excluding 0) is equivalent to 1 mod n. Otherwise this product is equivalent to 0.

Examples

			Triangle begins:
  (mod 1)     0;
  (mod 2)     0, 1;
  (mod 3)     0, 1;
  (mod 4)     0, 1;
  (mod 5)     0, 1;
  (mod 6)     0, 1, 3, 4;
  (mod 7)     0, 1, 2, 4;
  (mod 8)     0, 1;
  (mod 9)     0, 1, 4, 7;
  (mod 10)    0, 1, 5, 6;
  (mod 11)    0, 1, 3, 4, 5, 9;
  (mod 12)    0, 1, 4, 9;
  (mod 13)    0, 1, 3, 9;
  (mod 14)    0, 1, 2, 4, 7, 8, 9, 11;
  (mod 15)    0, 1, 6, 10;
  (mod 16)    0, 1;
  (mod 17)    0, 1;
              ...
		

Crossrefs

Programs

  • PARI
    row(n)=my(p=[0..n>>1], c=[0..n>>1]); until(p==c, p=c; c=Set([lift(Mod(v, n)^2)|v<-c])); return(c);
  • Python
    def row(n):
        l = set(range((n >> 1) + 1))
        while True:
            newl = {x**2 % n for x in l}
            if newl == l: break
            l = newl
        return l
    
Previous Showing 21-30 of 49 results. Next