This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A288726 #28 Aug 17 2025 01:52:31 %S A288726 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, %T A288726 72,72,72,72,59,88,88,119,119,119,119,119,102,139,139,139,120,161,161, %U A288726 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 %N A288726 a(n) = Sum_{i=floor((n-1)/2)..n-1} i * c(i), where c is the prime characteristic (A010051). %C A288726 Sum of the primes in the n-th column of the example in A258087. %H A288726 Robert Israel, <a href="/A288726/b288726.txt">Table of n, a(n) for n = 0..10000</a> %F A288726 From _Robert Israel_, Jun 16 2017: (Start) %F A288726 For k >= 2, a(2*k+1) - a(2*k) = 1-k if k-1 is prime, otherwise 0. %F A288726 a(2*k+2) - a(2*k+1) = 2*k+1 if 2*k+1 is prime, otherwise 0. (End) %F A288726 a(n) = A288656(n) - A288656(n-1), n>=1. - _Wesley Ivan Hurt_, Dec 26 2023 %p A288726 with(numtheory): A288726:=n->add(i*(pi(i)-pi(i-1)), i=floor((n-1)/2)..n-1): seq(A288726(n), n=0..100); %p A288726 # Alternative: %p A288726 M:= 100: # to get a(0) to a(2*M+1) %p A288726 A:= Array(0..2*M+1): %p A288726 A[3]:= 2: %p A288726 for k from 2 to M do %p A288726 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; %p A288726 if isprime(k-1) then A[2*k+1]:= A[2*k]-(k-1) else A[2*k+1]:= A[2*k] fi; %p A288726 od: %p A288726 convert(A,list); # _Robert Israel_, Jun 16 2017 %t A288726 Table[Sum[i (PrimePi[i] - PrimePi[i - 1]), {i, Floor[(n - 1)/2], n - 1}], {n, 0, 68}] (* _Michael De Vlieger_, Jun 14 2017 *) %o A288726 (PARI) a(n) = sum(i=floor((n-1)/2), n-1, i*isprime(i)) \\ _Felix Fröhlich_, Jun 16 2017 %Y A288726 Cf. A010051, A258087, A288656. %K A288726 nonn,easy %O A288726 0,4 %A A288726 _Wesley Ivan Hurt_, Jun 14 2017