|
|
A294113
|
|
Sum of the smaller parts of the partitions of 2n into two parts with larger part prime.
|
|
2
|
|
|
0, 3, 4, 4, 8, 6, 11, 8, 13, 20, 28, 24, 32, 25, 32, 41, 51, 42, 51, 40, 49, 60, 72, 60, 72, 84, 97, 111, 125, 109, 124, 107, 121, 136, 152, 169, 188, 169, 187, 206, 226, 204, 224, 199, 218, 238, 258, 229, 248, 268, 289, 312, 336, 306, 331, 357, 384, 412
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{i=1..n} i * A010051(2n-i).
|
|
EXAMPLE
|
For n=7, 2n = 14 can be partitioned into two parts with the larger part prime as 13 + 1, 11 + 3, and 7 + 7. So a(7) = 1 + 3 + 7 = 11. - Michael B. Porter, Mar 14 2018
|
|
MAPLE
|
N:= 1000: # to get a(1)..a(n)
P:= select(isprime, [2, seq(i, i=3..2*N, 2)]):
S:= ListTools:-PartialSums(P):
f:= proc(n) local k1, k2;
k1:= numtheory:-pi(2*n);
k2:= numtheory:-pi(n-1);
2*n*(k1-k2) - S[k1] + S[k2]
end proc:
f(1):= 0:
|
|
MATHEMATICA
|
Table[Sum[i (PrimePi[2 n - i] - PrimePi[2 n - i - 1]), {i, n}], {n, 80}]
|
|
PROG
|
(PARI) a(n) = sum(k=1, n, k*isprime(2*n-k)); \\ Michel Marcus, Oct 24 2017
(PARI) a(n) = my(res = 0); forprime(p = n, 2*n, res+=(2*n - p)); res \\ David A. Corneth, Oct 24 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|