OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
MATHEMATICA
Join[{1}, Table[Sum[j*Prime[n-j], {j, 1, Floor[(n+1)/2]}], {n, 2, 50}]] (* G. C. Greubel, Jun 12 2019 *)
PROG
(PARI) a(n) = sum(j=1, floor((n+1)/2), j*prime(n-j));
vector(50, n, if(n==1, 1, a(n))) \\ G. C. Greubel, Jun 12 2019
(Magma) [1] cat [(&+[j*NthPrime(n-j): j in [1..Floor((n+1)/2)]]): n in [2..50]]; // G. C. Greubel, Jun 12 2019
(Sage) [1]+[sum(j*nth_prime(n-j) for j in (1..floor((n+1)/2))) for n in (2..50)] # G. C. Greubel, Jun 12 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Title simplified by Sean A. Irvine, Jun 12 2019
STATUS
approved