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”).

A120439
Average of twin-prime pairs modulo 5.
0
-1, 1, 2, -2, 0, 2, 0, 2, 2, -2, -2, 0, 0, 2, -2, -2, 0, 0, 2, 2, -2, 0, 2, 2, 2, 0, 0, -2, 2, 0, 0, 2, -2, -2, 2, 0, 2, 0, 2, 2, 2, 0, -2, 0, 2, 0, -2, 2, 2, -2, -2, 0, -2, -2, 2, -2, 2, -2, 2, 0, -2, -2, 2, -2, 2, 0, 2, -2, -2, 0, 0, 2, 0, 2, -2, -2, 2, 0, 0, 2, 0, 0, 0, -2, 2, -2, 0, 0, 0, 2, 0, 2, -2, -2, 0, -2, 2, 2, -2, 2, 2, -2, 0, 2, 0, 0, 2, -2, -2, -2, 0
OFFSET
1,3
EXAMPLE
First twin-prime average = 4 (=-1+1*5): a(1) = -1.
Second twin-prime average = 6 (=1+1*5): a(2) = +1.
Third twin-prime average = 12 (=2+2*5): a(3) = +2.
MATHEMATICA
Mod[#, 5]&/@(Mean/@Select[Partition[Prime[Range[1000]], 2, 1], Last[#]- First[#]==2&])/.{4->-1, 3->-2} (* Harvey P. Dale, Dec 18 2013 *)
CROSSREFS
Cf. A014574.
Sequence in context: A122157 A080378 A243865 * A248512 A352564 A353596
KEYWORD
sign
AUTHOR
Greg Huber, Jul 18 2006
STATUS
approved