OFFSET
0,3
COMMENTS
a(n) is the running sum of the set integers where all primes are even.
EXAMPLE
n Sum Action Reason
-- ---- ------- --------------
0 0 add 0 0 is not prime
1 1 add 1 1 is not prime
2 3 add 2 2 is prime
3 5 add 2 3 is prime
4 9 add 4 4 is not prime
MAPLE
g(n, m) = s=0; for(x=0, n, if(isprime(x), s+=m, s+=x); print1(s", "))
MATHEMATICA
Accumulate[If[PrimeQ[#], 2, #]&/@Range[0, 60]] (* Harvey P. Dale, Feb 15 2012 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Feb 04 2006
STATUS
approved