login
A049882
a(n) is the number of distinct sums of 4 different primes chosen from the first n primes.
3
1, 5, 13, 23, 32, 43, 57, 69, 84, 98, 110, 125, 139, 155, 170, 187, 202, 214, 230, 246, 262, 281, 299, 316, 330, 344, 357, 379, 401, 420, 437, 459, 477, 495, 515, 534, 553, 571, 586, 608, 627, 642, 657, 677, 701, 725, 748, 767, 783, 801, 821, 841, 859, 876, 900, 917, 935, 949, 970, 997
OFFSET
4,2
EXAMPLE
From Petros Hadjicostas, Nov 19 2019: (Start)
The first 4 primes are 2, 3, 5, and 7 and they form only one sum, so a(4) = 1.
The first 5 primes are 2, 3, 5, 7, and 11, and they form 5 distinct sums each with four different terms (17, 21, 23, 25, 26), so a(2) = 5.
The first 6 primes are 2, 3, 5, 7, 11, and 13, and they form 13 distinct sums each with four different terms (17, 21, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 36), so a(6) = 13. (End)
MAPLE
f := proc(n) local v, i, j, k, m; v := {};
if 4 <= n then
for i from 1 to n - 3 do
for j from i + 1 to n - 2 do
for k from j + 1 to n - 1 do
for m from k + 1 to n do
v := v union {ithprime(i) + ithprime(j) + ithprime(k) + ithprime(m)};
end do; end do; end do; end do;
end if; nops(v); end proc;
seq(f(n), n=4..40); # Petros Hadjicostas, Nov 19 2019
CROSSREFS
KEYWORD
nonn
EXTENSIONS
Name edited by and more terms from Petros Hadjicostas, Nov 19 2019
STATUS
approved