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

A010461 Squares mod 100.

Original entry on oeis.org

0, 1, 4, 9, 16, 21, 24, 25, 29, 36, 41, 44, 49, 56, 61, 64, 69, 76, 81, 84, 89, 96
Offset: 1

Views

Author

Keywords

Comments

Range of A002015; subset of A122986. - Reinhard Zumkeller, Mar 21 2010

Crossrefs

Row 100 of A096008.
Cf. A028813.

Programs

  • Magma
    [n: n in [0..99] | IsSquare(R! n) where R:= ResidueClassRing(100)]; // Vincenzo Librandi, Dec 28 2019
  • Mathematica
    Union[PowerMod[Range[100], 2, 100]] (* Alonso del Arte, Dec 25 2019 *)
  • PARI
    A010461=Set(vector(100,n,n^2)%100) \\ M. F. Hasler, Mar 03 2014
    
  • Sage
    [quadratic_residues(100)] # Zerinvary Lajos, May 28 2009
    
  • Scala
    (1 to 100).map(n => (n * n) % 100).toSet.toSeq.sorted // Alonso del Arte, Dec 25 2019
    

A122986 Squares mod 1000.

Original entry on oeis.org

0, 1, 4, 9, 16, 24, 25, 36, 41, 44, 49, 56, 64, 76, 81, 84, 89, 96, 100, 104, 116, 121, 124, 129, 136, 144, 156, 161, 164, 169, 176, 184, 196, 201, 204, 209, 216, 224, 225, 236, 241, 244, 249, 256, 264, 276, 281, 284, 289, 296, 304, 316, 321, 324, 329, 336, 344
Offset: 1

Views

Author

Sergio Pimentel, Sep 22 2006

Keywords

Comments

Possible last three digits of n^2 (leading zeros omitted).
Range of A174452; A010461 is a subset; and also all squares less than 1000 belong to this sequence; the sequence is finite with A000993(3)=159 terms: a(159)=996 is the last term.

Examples

			The last three digits of n^2 can be 000, 001, 236, 241, 996, etc. but not 002, 003, 237, 238, etc.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..999] | IsSquare(R! n) where R:= ResidueClassRing(1000)]; // Vincenzo Librandi, Dec 29 2019
  • Maple
    s:={}: for n from 0 to 999 do s:=s union {n^2 mod 1000}: od: op(s); # Nathaniel Johnston, Jun 22 2011
  • Mathematica
    Union[PowerMod[Range[1000], 2, 1000]] (* Vincenzo Librandi, Dec 29 2019 *)

Extensions

More terms and additional comments from Reinhard Zumkeller, Mar 21 2010
Edited by N. J. A. Sloane, Apr 10 2010

A159852 n^2 mod 60.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1, 40, 21, 4, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1, 40, 21, 4, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 24 2009

Keywords

Comments

Periodic with period 30: a(n+30) = a(n);
a(15*n+k) = a(15*n-k) for k<=15*n;
a(m*n) = a(m)*a(n) mod 60;
A010421 gives the range of this sequence.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},{0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1, 40, 21, 4, 49, 36, 25, 16, 9, 4, 1},80] (* Ray Chandler, Aug 26 2015 *)
    PowerMod[Range[0,80],2,60] (* or *) PadRight[{},80,{0,1,4,9,16,25,36,49,4,21,40,1,24,49,16,45,16,49,24,1,40,21,4,49,36,25,16,9,4,1}] (* Harvey P. Dale, Jun 19 2018 *)
  • PARI
    a(n)=n^2%60 \\ Charles R Greathouse IV, May 09 2013

A010382 Squares mod 20.

Original entry on oeis.org

0, 1, 4, 5, 9, 16
Offset: 1

Views

Author

Keywords

Comments

Range of A070442. - Reinhard Zumkeller, Apr 24 2009

Crossrefs

Row 20 of A096008.
Cf. A028733.

Programs

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

A010462 Squares mod 30.

Original entry on oeis.org

0, 1, 4, 6, 9, 10, 15, 16, 19, 21, 24, 25
Offset: 1

Views

Author

Keywords

Comments

Range of A070452; a(k) + a(13-k) = 25, 1 <= k <= 12. - Reinhard Zumkeller, Apr 24 2009

Examples

			3^2 = 9, so 9 is in the sequence.
10^2 and 20^2 are both congruent to 10 mod 30, so 10 is in the sequence.
There are no solutions to x^2 = 11 mod 30, so 11 is not in the sequence.
		

Crossrefs

Row 30 of A096008.
Cf. A028743.

Programs

A010378 Squares mod 15.

Original entry on oeis.org

0, 1, 4, 6, 9, 10
Offset: 1

Views

Author

Keywords

Comments

Range of A070438; a(k) + a(7-k) = 10, 1 <= k <= 6. -Reinhard Zumkeller, Apr 24 2009

Crossrefs

Row 15 of A096008.

Programs

A028773 Nonsquares mod 60.

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 22, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59
Offset: 1

Views

Author

Keywords

Examples

			x^2 = 20 mod 60 has no solutions, so 20 is in the sequence.
x^2 = 21 mod 60 has the following solutions: x = 9, x = 21, x = 39, x = 51. Hence 21 is not in the sequence.
		

Crossrefs

Cf. A010421.

Programs

  • Mathematica
    Complement[Range[59], PowerMod[Range[60], 2, 60]] (* Alonso del Arte, Jan 13 2017 *)
  • Scala
    (0 to 59).diff((1 to 60).map(n => n * n % 60)) // Alonso del Arte, Jan 03 2020
Showing 1-7 of 7 results.