login

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

a(n) = n^2 mod 23.
2

%I #18 Dec 18 2023 13:54:56

%S 0,1,4,9,16,2,13,3,18,12,8,6,6,8,12,18,3,13,2,16,9,4,1,0,1,4,9,16,2,

%T 13,3,18,12,8,6,6,8,12,18,3,13,2,16,9,4,1,0,1,4,9,16,2,13,3,18,12,8,6,

%U 6,8,12,18,3,13,2,16,9,4,1,0,1,4,9,16,2,13,3,18,12,8,6,6,8,12,18,3,13,2,16

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

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

%H <a href="/index/Rec#order_23">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, 1).

%F From _Robert Israel_, Apr 23 2015: (Start)

%F a(n+23) = a(n).

%F G.f.: (1 +3*x +6*x^2 +10*x^3 -8*x^4 +21*x^5 -18*x^6 +36*x^7 -24*x^8 +32*x^9 -26*x^10 +32*x^11 -24*x^12 +36*x^13 -18*x^14 +21*x^15 -8*x^16 +10*x^17 +6*x^18 +3*x^19 +x^20)*x*(1+x)/(1-x^23). (End)

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

%o (Magma) [n^2 mod 23: n in [0..100]]; // _Vincenzo Librandi_, Apr 23 2015

%o (PARI) a(n)=n^2%23 \\ _Charles R Greathouse IV_, Apr 23 2015

%K nonn,easy

%O 0,3

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