The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Periodic with period = 12. - Harvey P. Dale, Jun 19 2014
From Jesse Fiedler, Aug 23 2019: (Start)
If a(n) = 1, then n is odd and is not divisible by 3.
For n <= 7919 and a(n)=1, approximately 37.8% of values of n are prime.
For n <= 104729, and a(n)=1, approximately 28.64% of values of n are prime.
(End)
LINKS
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
MATHEMATICA
Table[Mod[n^2, 24], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2011 *)
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 *)
PROG
(PARI) a(n)=n^2%24 \\ Charles R Greathouse IV, Apr 06 2016
CROSSREFS
Sequence in context: A106546 A276191 A007893 * A258682 A070445 A070444
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved

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 May 15 18:29 EDT 2024. Contains 372549 sequences. (Running on oeis4.)