login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070446 a(n) = n^2 mod 24. 2

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 17:00 EDT 2024. Contains 371749 sequences. (Running on oeis4.)