login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = n^2 mod 25.
1

%I #31 Dec 18 2023 13:52:41

%S 0,1,4,9,16,0,11,24,14,6,0,21,19,19,21,0,6,14,24,11,0,16,9,4,1,0,1,4,

%T 9,16,0,11,24,14,6,0,21,19,19,21,0,6,14,24,11,0,16,9,4,1,0,1,4,9,16,0,

%U 11,24,14,6,0,21,19,19,21,0,6,14,24,11,0,16,9,4,1,0,1,4,9,16,0,11,24,14,6

%N a(n) = n^2 mod 25.

%H G. C. Greubel, <a href="/A070447/b070447.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_25">Index entries for linear recurrences with constant coefficients</a>, signature (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).

%F G.f.: (x + 4*x^2 + 9*x^3 + 16*x^4 + 11*x^6 + 24*x^7 + 14*x^8 + 6*x^9 + 21*x^11 + 19*x^12 + 19*x^13 + 21*x^14 + 6*x^16 + 14*x^17 + 24*x^18 + 11*x^19 + 16*x^21 + 9*x^22 + 4*x^23 + x^24) / (1 - x^25). - _Vincenzo Librandi_, Dec 17 2014

%F a(n) = (n + 25h); a(n) = 0 if n == 0 (mod 5). Also, a(r) = a(s) if r+s == 0 (mod 25). - _Vincenzo Librandi_, Dec 18 2014

%t Table[Mod[n^2,25],{n,0,200}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 23 2011 *)

%o (Magma) [n^2 mod 25: n in [0..100]]; // _Vincenzo Librandi_, Dec 18 2014

%o (PARI) a(n)=n^2%25 \\ _Charles R Greathouse IV_, Apr 06 2016

%K nonn,easy

%O 0,3

%A _N. J. A. Sloane_, May 12 2002