Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #25 Sep 10 2019 21:48:20
%S 0,1,4,9,16,1,12,1,16,9,4,1,0,1,4,9,16,1,12,1,16,9,4,1,0,1,4,9,16,1,
%T 12,1,16,9,4,1,0,1,4,9,16,1,12,1,16,9,4,1,0,1,4,9,16,1,12,1,16,9,4,1,
%U 0,1,4,9,16,1,12,1,16,9,4,1,0,1,4,9,16,1,12,1,16,9,4,1,0,1,4,9,16,1,12,1
%N a(n) = n^2 mod 24.
%C Periodic with period = 12. - _Harvey P. Dale_, Jun 19 2014
%C From _Jesse Fiedler_, Aug 23 2019: (Start)
%C If a(n) = 1, then n is odd and is not divisible by 3.
%C For n <= 7919 and a(n)=1, approximately 37.8% of values of n are prime.
%C For n <= 104729, and a(n)=1, approximately 28.64% of values of n are prime.
%C (End)
%H G. C. Greubel, <a href="/A070446/b070446.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
%t Table[Mod[n^2,24],{n,0,200}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 23 2011 *)
%t PowerMod[Range[0,100],2,24] (* or *) PadRight[{},100,{0,1,4,9,16,1,12,1,16,9,4,1}] (* _Harvey P. Dale_, Jun 19 2014 *)
%o (PARI) a(n)=n^2%24 \\ _Charles R Greathouse IV_, Apr 06 2016
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_, May 12 2002