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!)
A066028 Largest prime which can be written as a sum of distinct primes <= prime(n). 3
2, 5, 7, 17, 23, 41, 53, 67, 97, 127, 157, 197, 233, 281, 317, 379, 433, 499, 563, 631, 709, 773, 863, 953, 1051, 1153, 1259, 1361, 1471, 1583, 1709, 1831, 1979, 2113, 2273, 2417, 2579, 2731, 2909, 3079, 3259, 3433, 3631, 3823, 4021, 4219, 4423, 4651 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Sequence is nondecreasing by definition. Is it strictly increasing? - Charles R Greathouse IV, Jun 20 2013
a(n) = A256015(n,A108018(n)). - Reinhard Zumkeller, Jun 01 2015
LINKS
EXAMPLE
n = 5: the following primes are sums of primes <= 11 = A000040(5): 2, 3, 5, 7, 11, 13, 17, 19 and 23 = 5+7+11 = 2+3+7+11, so a(5) = 23.
MATHEMATICA
Reap[Do[a = {1, 4, 6}; s = Sum[Prime[i], {i, 1, n}]; q = s; While[ !PrimeQ[q] || Length[ Position[a, s - q]] > 0, q = NextPrime[q, -1]]; Print[q]; Sow[q], {n, 1, 60}]][[2, 1]] (* updated by Jean-François Alcover, Feb 10 2015 *)
Table[Max[Select[Total/@Subsets[Prime[Range[n]], {Max[1, n-5], n}], PrimeQ]], {n, 50}] (* To shorten computation time, the program only tests for the subsets of primes equal to n, n-1, n-2, n-3, n-4, and n-5 in length. *) (* Harvey P. Dale, Aug 05 2016 *)
PROG
(Haskell)
import Data.List (subsequences)
a066028 = maximum . filter ((== 1) . a010051') .
map sum . tail . subsequences . flip take a000040_list
-- Reinhard Zumkeller, Jun 01 2015
CROSSREFS
Cf. A007504.
Sequence in context: A278487 A176676 A307452 * A066039 A142341 A318731
KEYWORD
nice,nonn
AUTHOR
Reinhard Zumkeller, Dec 11 2001
EXTENSIONS
More terms from Robert G. Wilson v, Dec 12 2001
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 August 26 06:07 EDT 2024. Contains 375454 sequences. (Running on oeis4.)