OFFSET
1,4
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{k=1..n} ((2*n-k) mod k) * c(k) * c(2*n-k), where c is the prime characteristic (A010051). - Wesley Ivan Hurt, Dec 22 2020
EXAMPLE
a(9) = 7 because 2*9 = 5 + 13 = 7 + 11 with (13 mod 5) + (11 mod 7) = 3 + 4 = 7.
MAPLE
N:= 200: # for a(1)..a(N/2)
P:= select(isprime, [seq(i, i=3..N, 2)]):
nP:= nops(P):
V:= Vector(N):
for i from 1 to nP do
for j from i+1 to nP do
v:= P[i]+P[j];
if v > N then break fi;
V[v]:= V[v] + (P[j] mod P[i])
od od:
[seq(V[2*i], i=1..N/2)];
MATHEMATICA
Table[Sum[Mod[2 n - k, k] (PrimePi[k] - PrimePi[k - 1]) (PrimePi[2 n - k] - PrimePi[2 n - k - 1]), {k, n}], {n, 60}] (* Wesley Ivan Hurt, Dec 22 2020 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
J. M. Bergot and Robert Israel, Dec 20 2020
STATUS
approved