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

A051356
Start with 0, run through primes >=5, adding if -1 mod 6, subtracting if +1 mod 6.
1
0, 5, -2, 9, -4, 13, -6, 17, 46, 15, -22, 19, -24, 23, 76, 135, 74, 7, 78, 5, -74, 9, 98, 1, 102, -1, 106, -3, 110, -17, 114, 251, 112, 261, 110, -47, -210, -43, 130, 309, 128, 319, 126, 323, 124, -87, -310, -83, -312, -79, 160, -81, 170, 427, 690
OFFSET
0,2
LINKS
EXAMPLE
a(5) = 13 = 5-7+11-13+17
MATHEMATICA
Accumulate[Join[{0}, If[Mod[#, 6]==1, -#, #]&/@Prime[Range[3, 60]]]] (* Harvey P. Dale, Jul 23 2012 *)
CROSSREFS
Sequence in context: A318379 A065262 A198738 * A188933 A306648 A255655
KEYWORD
sign,easy
AUTHOR
Armand Turpel armandt(AT)unforgettable.com
STATUS
approved