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!)
A339613 Number of sets of distinct primes whose sum is a prime, the largest element of a set is prime(n). 0
1, 2, 2, 2, 5, 8, 15, 30, 57, 115, 211, 398, 783, 1528, 3002, 5893, 11432, 22247, 43663, 86348, 170472, 335636, 662988, 1312816, 2595986, 5121351, 10096635, 19930303, 39469458, 78311512, 155219706, 307373610, 607613871, 1202463562, 2383024521, 4736192475, 9413441133 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(6) = 8 sets: {13}, {3, 7, 13}, {5, 11, 13}, {7, 11, 13}, {2, 3, 5, 13}, {2, 3, 11, 13}, {2, 5, 11, 13} and {2, 3, 5, 7, 11, 13}.
PROG
(Python)
from sympy import prime, isprime
from functools import lru_cache
@lru_cache(maxsize=None)
def b(n, s, c):
if n == 0:
if isprime(s): return 1
return 0
return b(n-1, s, c) + b(n-1, s+prime(n), c+1)
a = lambda n: b(n-1, prime(n), 1)
print([a(n) for n in range(1, 20)]) # Michael S. Branicky, Dec 10 2020
CROSSREFS
Cf. A000040, A071810 (partial sums), A127542.
Sequence in context: A039886 A367087 A109523 * A008295 A216694 A116697
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 09 2020
EXTENSIONS
a(35)-a(37) from Michael S. Branicky, Dec 09 2020
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 09:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)