login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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
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)
a(n) = A288656(n) - A288656(n-1), n>=1. - Wesley Ivan Hurt, Dec 26 2023
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
Sequence in context: A243333 A059797 A173567 * A344572 A265129 A212624
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)