

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

G. C. Greubel, Table of n, a(n) for n = 0..1000
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
Adjacent sequences: A070443 A070444 A070445 * A070447 A070448 A070449


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane, May 12 2002


STATUS

approved



