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.

A070452 a(n) = n^2 mod 30.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

Equivalently, n^6 mod 30. - Ray Chandler, Dec 27 2023

Crossrefs

Programs

  • Mathematica
    Table[Mod[n^2,30],{n,0,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 27 2011 *)
    LinearRecurrence[{-1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1},{0, 1, 4, 9, 16, 25, 6, 19, 4, 21, 10, 1, 24, 19, 16, 15, 16, 19, 24, 1, 10, 21, 4, 19, 6, 25, 16, 9},80] (* Ray Chandler, Aug 26 2015 *)
    PowerMod[Range[0,80],6,30] (* or *) PadRight[{},80,{0,1,4,9,16,25,6,19,4,21,10,1,24,19,16,15,16,19,24,1,10,21,4,19,6,25,16,9,4,1}] (* Harvey P. Dale, Jul 10 2023 *)
  • PARI
    a(n)=n^2%30 \\ Charles R Greathouse IV, Oct 07 2015
  • Sage
    [power_mod(n,2,30)for n in range(0, 75)] # Zerinvary Lajos, Nov 03 2009
    

Formula

From Reinhard Zumkeller, Apr 24 2009: (Start)
a(m*n) = a(m)*a(n) mod 30.
a(15*n+k) = a(15*n-k) for k<=15*n.
a(n+30) = a(n). (End)
a(n)= -a(n-1) +a(n-3) +a(n-4) -a(n-6) -a(n-7) +a(n-9) +a(n-10) -a(n-12) -a(n-13) +a(n-15) +a(n-16) -a(n-18) -a(n-19) +a(n-21) +a(n-22) -a(n-24) -a(n-25) +a(n-27) +a(n-28). - R. J. Mathar, Jul 23 2009

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

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

A010421 Squares mod 60.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Range of A159852. - Reinhard Zumkeller, Apr 24 2009

Crossrefs

Row 60 of A096008.

Programs

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

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

A028743 Nonsquares mod 30.

Original entry on oeis.org

2, 3, 5, 7, 8, 11, 12, 13, 14, 17, 18, 20, 22, 23, 26, 27, 28, 29
Offset: 1

Views

Author

Keywords

Examples

			Since 5 is not a perfect square and there are no solutions to x^2 = 5 mod 30, 5 is in the sequence.
Although 6 is not a perfect square either, there are solutions to x^2 = 6 mod 30, such as x = 6, x = 24, so 6 is not in the sequence.
		

Crossrefs

Cf. A010462.

Programs

  • Mathematica
    Complement[Range[30], PowerMod[Range[30], 2, 30]] (* Alonso del Arte, Nov 30 2019 *)
  • Scala
    val squaresMod30 = (1 to 30).map(n => n * n).map(_ % 30)
    (0 to 29).diff(squaresMod30) // Alonso del Arte, Nov 30 2019

Extensions

Incorrect term 15 removed by Alonso del Arte, Nov 30 2019
Showing 1-7 of 7 results.