login
A023870
a(n) = 1*prime(n) + 2*prime(n-1) + ... + k*prime(n+1-k), where k=floor((n+1)/2) and prime(n) is the n-th prime.
2
2, 3, 11, 17, 40, 56, 104, 136, 219, 265, 397, 475, 672, 776, 1046, 1198, 1561, 1755, 2223, 2443, 3026, 3316, 4030, 4352, 5215, 5605, 6631, 7119, 8318, 8878, 10270, 10892, 12499, 13183, 15019, 15847, 17930, 18836, 21182, 22210, 24837, 26039, 28965, 30267, 33504
OFFSET
1,1
COMMENTS
Also, a(n) = s(1)t(n) + s(2)t(n-1) + ... + s(k)t(n-k+1), where k = [ n/2 ], s = (natural numbers), t = (1, p(1), p(2), ... ).
LINKS
MATHEMATICA
Table[Sum[j*Prime[n+1-j], {j, 1, Floor[(n+1)/2]}], {n, 1, 50}] (* G. C. Greubel, Jun 12 2019 *)
PROG
(PARI) {a(n) = sum(j=1, floor((n+1)/2), j*prime(n+1-j))}; \\ G. C. Greubel, Jun 12 2019
(Magma) [(&+[j*NthPrime(n+1-j): j in [1..Floor((n+1)/2)]]): n in [1..50]]; // G. C. Greubel, Jun 12 2019
(Sage) [sum(j*nth_prime(n+1-j) for j in (1..floor((n+1)/2))) for n in (1..50)] # G. C. Greubel, Jun 12 2019
CROSSREFS
Sequence in context: A176671 A191085 A024859 * A025099 A024597 A147655
KEYWORD
nonn
EXTENSIONS
Title simplified by Sean A. Irvine, Jun 12 2019
STATUS
approved