A070643 Duplicate of A070442.
0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1
Offset: 0
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.
[0] cat [Intseq(n^2)[1]: n in [1..80]]; // Bruno Berselli, Feb 14 2013
[n^2 - 10*Floor(n^2/10): n in [0..80]]; // Vincenzo Librandi, Jun 16 2015
A008959:=n->(n^2 mod 10); seq(A008959(n), n=0..50); # Wesley Ivan Hurt, Jun 06 2014
Table[Mod[n^2,10],{n,0,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 21 2011 *) PowerMod[Range[0,80],2,10] (* or *) LinearRecurrence[{0,0,0,0,0,0,0,0,0,1},{0,1,4,9,6,5,6,9,4,1},120] (* Harvey P. Dale, Oct 16 2012 *)
a(n)=n^2%10 \\ Charles R Greathouse IV, Sep 24 2015
[power_mod(n,2,10) for n in range(0, 81)] # Zerinvary Lajos, Nov 06 2009
[n^2 mod 6 : n in [0..100]]; // Wesley Ivan Hurt, Apr 01 2016
[Modexp(n, 2, 6): n in [0..100]]; // Vincenzo Librandi, Apr 02 2016
A070431:=n->n^2 mod 6: seq(A070431(n), n=0..100); # Wesley Ivan Hurt, Apr 01 2016
Table[Mod[n^2, 6], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 21 2011 *) LinearRecurrence[{0, 0, 0, 0, 0, 1},{0, 1, 4, 3, 4, 1},101] (* Ray Chandler, Aug 26 2015 *) PowerMod[Range[0,120],2,6] (* or *) PadRight[{},120,{0,1,4,3,4,1}] (* Harvey P. Dale, Aug 11 2019 *)
a(n)=n^2%6 \\ Charles R Greathouse IV, Sep 24 2015
[power_mod(n,2,6) for n in range(0, 101)] # Zerinvary Lajos, Oct 30 2009
[Modexp(n, 2, 12): n in [0..100]]; // Wesley Ivan Hurt, Apr 01 2016
A070435:=n->n^2 mod 12: seq(A070435(n), n=0..100); # Wesley Ivan Hurt, Apr 01 2016
Table[Mod[n^2,12],{n,0,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 21 2011 *) LinearRecurrence[{0, 0, 0, 0, 0, 1},{0, 1, 4, 9, 4, 1},101] (* Ray Chandler, Aug 26 2015 *) PowerMod[Range[0, 100], 2, 12] (* Wesley Ivan Hurt, Apr 02 2016 *)
a(n)=n^2%12 \\ Charles R Greathouse IV, Sep 23 2013
[power_mod(n,4,12) for n in range(0, 101)] # Zerinvary Lajos, Oct 31 2009
Table[Mod[n^2,15],{n,0,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 21 2011 *) LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},{0, 1, 4, 9, 1, 10, 6, 4, 4, 6, 10, 1, 9, 4, 1},97] (* Ray Chandler, Aug 26 2015 *)
a(n)=n^2%15 \\ Charles R Greathouse IV, Sep 28 2015
[power_mod(n,2,15)for n in range(0, 97)] # Zerinvary Lajos, Nov 06 2009
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 *)
a(n)=n^2%30 \\ Charles R Greathouse IV, Oct 07 2015
[power_mod(n,2,30)for n in range(0, 75)] # Zerinvary Lajos, Nov 03 2009
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 *)
a(n)=n^2%60 \\ Charles R Greathouse IV, May 09 2013
Union[PowerMod[Range[20], 2, 20]] (* Alonso del Arte, Dec 20 2019 *)
[quadratic_residues(20)] # Zerinvary Lajos, May 24 2009
(1 to 20).map(n => (n * n) % 20).toSet.toSeq.sorted // Alonso del Arte, Dec 20 2019
Some calculations for n=982451653, to be realized by hand: a(n) = (53^2 + 200*6*3) mod 1000 = 6409 mod 1000 = 409; a(n) = (653^2) mod 1000 = 426409 mod 1000 = 409; a(n) = a(n mod 500) = a(153) = 409; a(n) = 965211250482432409 mod 1000 = 409.
a174452 = (`mod` 1000) . (^ 2) -- Reinhard Zumkeller, Jul 06 2011
seq(n^2 mod 1000, n=0..55); # Nathaniel Johnston, Jun 22 2011
PowerMod[Range[0,60],2,1000] (* Harvey P. Dale, Feb 08 2022 *)
a(n)=n^2%1000 \\ Charles R Greathouse IV, Apr 06 2016
PowerMod[Range[0,60],2,100] (* Harvey P. Dale, Nov 28 2012 *)
a(n)=n^2%100 \\ Charles R Greathouse IV, Oct 07 2015
Comments