login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A071810 Number of subsets of the first n primes whose sum is a prime. 6
1, 3, 5, 7, 12, 20, 35, 65, 122, 237, 448, 846, 1629, 3157, 6159, 12052, 23484, 45731, 89394, 175742, 346214, 681850, 1344838, 2657654, 5253640, 10374991, 20471626, 40401929, 79871387, 158182899, 313402605, 620776215, 1228390086, 2430853648 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(n+1) < 2*a(n) fails for n = 1, 332 and other larger values of n. - Don Reble, Sep 07 2006

Here is one way to compute this sequence. Compute f_n(x) = product_{k=1..n} 1+x^Prime(k) = f_{n-1}(x) * (1+x^Prime(n)). Then sum the coefficients of x^p in f_n(x) for p prime. You only need to look at primes <= the sum of the first n primes. - Franklin T. Adams-Watters, Sep 07 2006

LINKS

T. D. Noe and Alois P. Heinz, Table of n, a(n) for n = 1..1000 (first 100 terms from T. D. Noe)

EXAMPLE

a(4) = 7 because, besides the original 4 primes, the other 3 subsets, {2,3}, {2,5} & {2,3,5,7} also sum to a prime.

MATHEMATICA

Do[ Print[ Count[ PrimeQ[Plus @@@ Subsets[ Table[ Prime[i], {i, 1, n}]]], True]], {n, 1, 22}]

Table[Count[Total/@Subsets[Prime[Range[n]]], _?PrimeQ], {n, 20}] (* Harvey P. Dale, Mar 03 2020 *)

PROG

(Haskell)

import Data.List (subsequences)

a071810 = sum . map a010051' . map sum .

          tail . subsequences . flip take a000040_list

-- Reinhard Zumkeller, Dec 16 2013

CROSSREFS

Cf. A000341, A108018.

Cf. A010051, A000040.

Sequence in context: A208716 A195821 A208772 * A137576 A161329 A111745

Adjacent sequences:  A071807 A071808 A071809 * A071811 A071812 A071813

KEYWORD

nonn,nice

AUTHOR

Robert G. Wilson v, Jun 06 2002

EXTENSIONS

More terms from Don Reble, Sep 07 2006

Edited by N. J. A. Sloane, Sep 08 2006

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 18:53 EDT 2021. Contains 343050 sequences. (Running on oeis4.)