The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A288726 a(n) = Sum_{i=floor((n-1)/2)..n-1} i * c(i), where c is the prime characteristic (A010051). 2
 0, 0, 0, 2, 5, 5, 10, 8, 15, 12, 12, 12, 23, 18, 31, 31, 31, 24, 41, 41, 60, 60, 60, 60, 83, 72, 72, 72, 72, 59, 88, 88, 119, 119, 119, 119, 119, 102, 139, 139, 139, 120, 161, 161, 204, 204, 204, 204, 251, 228, 228, 228, 228, 228, 281, 281, 281, 281, 281, 281, 340, 311, 372, 372, 372, 341, 341, 341, 408 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS Sum of the primes in the n-th column of the example in A258087. LINKS Robert Israel, Table of n, a(n) for n = 0..10000 FORMULA From Robert Israel, Jun 16 2017: For k >= 2, a(2*k+1) - a(2*k) = 1-k if k-1 is prime, otherwise 0. a(2*k+2) - a(2*k+1) = 2*k+1 if 2*k+1 is prime, otherwise 0. (End) MAPLE with(numtheory): A288726:=n->add(i*(pi(i)-pi(i-1)), i=floor((n-1)/2)..n-1): seq(A288726(n), n=0..100); # Alternative: M:= 100: # to get a(0) to a(2*M+1) A:= Array(0..2*M+1): A[3]:= 2: for k from 2 to M do    if isprime(2*k-1) then A[2*k]:= A[2*k-1]+2*k-1 else A[2*k]:=A[2*k-1] fi;    if isprime(k-1) then A[2*k+1]:= A[2*k]-(k-1) else A[2*k+1]:= A[2*k] fi; od: convert(A, list); # Robert Israel, Jun 16 2017 MATHEMATICA Table[Sum[i (PrimePi[i] - PrimePi[i - 1]), {i, Floor[(n - 1)/2], n - 1}], {n, 0, 68}] (* Michael De Vlieger, Jun 14 2017 *) PROG (PARI) a(n) = sum(i=floor((n-1)/2), n-1, i*isprime(i)) \\ Felix FrÃ¶hlich, Jun 16 2017 CROSSREFS Cf. A010051, A258087. Sequence in context: A243333 A059797 A173567 * A265129 A212624 A034387 Adjacent sequences:  A288723 A288724 A288725 * A288727 A288728 A288729 KEYWORD nonn,easy AUTHOR Wesley Ivan Hurt, Jun 14 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 22 11:29 EDT 2020. Contains 337289 sequences. (Running on oeis4.)