login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049881 a(n) is the number of distinct sums of 3 different primes chosen from the first n primes. 3
1, 4, 10, 16, 23, 30, 38, 47, 57, 67, 77, 87, 96, 106, 116, 129, 140, 151, 160, 172, 183, 194, 208, 220, 231, 242, 252, 261, 279, 292, 304, 319, 334, 346, 360, 374, 389, 400, 413, 426, 440, 452, 464, 476, 488, 505, 524, 538, 552, 563, 576, 591, 604, 615, 625, 645, 659, 673, 683, 698, 716, 733 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,2
LINKS
EXAMPLE
From Petros Hadjicostas, Nov 19 2019: (Start)
The first 3 primes are 2, 3, and 5, and they form only one sum, so a(4) = 1.
The first 4 primes are 2, 3, 5, and 7, and they form 4 distinct sums each with three different terms (10, 12, 14, 15), so a(2) = 4.
The first 5 primes are 2, 3, 5, 7, and 11, and they form 13 distinct sums each with three different terms (10, 12, 14, 15, 16, 18, 19, 20, 21, 23), so a(5) = 10.
(End)
MAPLE
f := proc(n) local v, i, j, k; v := {};
if 3 <= n then
for i from 1 to n - 2 do
for j from i + 1 to n - 1 do
for k from j + 1 to n do
v := v union {ithprime(i) + ithprime(j) + ithprime(k)};
end do; end do; end do;
end if; nops(v); end proc;
seq(f(n), n=3..40); #
PROG
(PARI) a(n)={my(pr=primes(n), sums=Set()); for(i=1, n-2, for(j=i+1, n-1, for(k=j+1, n, s=pr[i]+pr[j]+pr[k]; sums=setunion(sums, Set(s)))); ); length(sums); }
for(n=3, 40, print1(a(n)", ")) \\ Petros Hadjicostas, Nov 19 2019 by modifying Michel Marcus's PARI program in A049880
CROSSREFS
Sequence in context: A341983 A184527 A246297 * A341064 A366661 A271911
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by and more terms from Petros Hadjicostas, Nov 19 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)