login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A106671
a(n) = ( prime(n + 2) * prime(n) - prime(n + 1)^2 ) modulo 3.
1
1, 2, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1
OFFSET
1,2
LINKS
FORMULA
a(n) = A056221(n) mod 3 = A010872(A056221(n)). - Michel Marcus, Apr 21 2017
MATHEMATICA
a = Table[Mod[Prime[n + 2]*Prime[n] - Prime[n + 1]^2, 3], {n, 1, 200}]
Mod[#[[3]]#[[1]]-#[[2]]^2, 3]&/@Partition[Prime[Range[110]], 3, 1] (* Harvey P. Dale, Oct 03 2015 *)
PROG
(PARI) a(n) = (prime(n + 2)*prime(n) - prime(n + 1)^2) % 3; \\ Michel Marcus, Apr 21 2017
CROSSREFS
Sequence in context: A093488 A085858 A188172 * A033776 A117371 A117370
KEYWORD
nonn,less
AUTHOR
Roger L. Bagula, May 13 2005
STATUS
approved