login
A077039
Sums of first n signatured primes (A073579).
3
0, -3, 2, -5, -16, -3, 14, -5, -28, 1, -30, 7, 48, 5, -42, 11, -48, 13, -54, -125, -52, -131, -214, -125, -28, 73, -30, -137, -28, 85, -42, -173, -36, -175, -26, -177, -20, -183, -350, -177, -356, -175, -366, -173, 24, -175, -386, -609, -836, -607, -374, -613, -372, -623
OFFSET
1,2
LINKS
FORMULA
a(n) = -Sum_{k=2..n} A000040(k)*i^(A000040(k)+1) where i is the imaginary unit. - Anthony Browne, May 17 2016
EXAMPLE
a(5) = 2*0+3*(-1)+5*1+7*(-1)+11*(-1) = 0-3+5-7-11 = -16.
MATHEMATICA
Accumulate[Join[{0}, If[Mod[#, 4]==1, #, -#]&/@Prime[Range[2, 60]]]] (* Harvey P. Dale, Feb 27 2012 *)
PROG
(Haskell)
a077039 n = a077039_list !! (n-1)
a077039_list = scanl1 (+) a073579_list
-- Reinhard Zumkeller, Feb 28 2012
CROSSREFS
KEYWORD
sign,look
AUTHOR
Reinhard Zumkeller, Oct 21 2002
STATUS
approved