login
A114186
Running sums of consecutive integers with all primes set to 2.
0
0, 1, 3, 5, 9, 11, 17, 19, 27, 36, 46, 48, 60, 62, 76, 91, 107, 109, 127, 129, 149, 170, 192, 194, 218, 243, 269, 296, 324, 326, 356, 358, 390, 423, 457, 492, 528, 530, 568, 607, 647, 649, 691, 693, 737, 782, 828, 830, 878, 927, 977, 1028, 1080, 1082, 1136, 1191
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
Sequence in context: A076193 A056533 A329110 * A117992 A015614 A138203
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Feb 04 2006
STATUS
approved