The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A124884 Largest number that is not a sum of n distinct primes, or -1 if such a number does not exist. 2
-1, -1, 17, 30, 41, 60, 83, 102, 137, 162, 203, 244, 293, 334, 389, 448, 515, 574, 647, 724, 803, 884, 977, 1066, 1163, 1276, 1373, 1492, 1607, 1738, 1865, 2002, 2141, 2290, 2435, 2602, 2759, 2932, 3095, 3280, 3467, 3646, 3857, 4054, 4247, 4456, 4683, 4912, 5141, 5374 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
a(1) = -1 because there are an infinite number of nonprimes.
a(3) = 17 because 17 = Max[{1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 17}] = Max[A124868(n)], where A124868(n) are the natural numbers that are not the sum of 3 distinct primes.
PROG
(PARI) print1("-1, -1, "); for(n=3, 50, L=0; for(i=1, n, L+=prime(i)); L*=2; a=matrix(n, L, i, j, 0); forprime(p=2, L, forstep(i=n, 2, -1, for(j=p+1, L, if(a[i-1, j-p], a[i, j]=1))); a[1, p]=1); r=L; while(a[n, r], r--); print1(r", "))
CROSSREFS
Number of natural numbers that are not a sum of n distinct primes, or -1 if it is infinite, are listed in A124885(n) = {-1, -1, 12, 22, 34, 49, 68, 90, 117, 147, 180, 219, ...}.
Natural numbers that are not the sum of 2 distinct primes are {1 - 4, 6, 11, 17, 23, 27, 29, 35, 37, 41, 47, ...}, complement to A038609(n)
Numbers that are the sum of 2 different primes.
Natural numbers that are not the sum of 3 distinct primes A124868(n) = {1 - 9, 11, 13, 17}.
Natural numbers that are not the sum of 4 distinct primes are {1 - 16, 18, 19, 20, 22, 24, 30}.
Natural numbers that are not the sum of 5 distinct primes are {1 - 27, 29, 31, 32, 33, 35, 37, 41}.
Natural numbers that are not the sum of 6 distinct primes are {1 - 40, 42, 43, 44, 46, 48, 50, 52, 54, 60}.
Natural numbers that are not the sum of 7 distinct primes are {1 - 57, 59, 61, 62, 63, 65, 67, 69, 71, 73, 77, 83}.
Natural numbers that are not the sum of 8 distinct primes are {1 - 76, 78, 79, 80, 82, 84, 85, 86, 88, 90, 92, 94, 96, 100, 102}.
Natural numbers that are not the sum of 9 distinct primes are {1 - 99, 101, 102, 103, 104, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 131, 133, 137}.
Natural numbers that are not the sum of 10 distinct primes are {1 - 128, 130, 132, 133, 134, 135, 136, 138, 139, 140, 142, 144, 146, 148, 150, 152, 154, 156, 160, 162}.
Natural numbers that are not the sum of 11 distinct primes are {1 - 159, 161, 162, 163, 164, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 197, 203}.
Natural numbers that are not the sum of 12 distinct primes are {1 - 196, 198, 199, 200, 202, 204, 205, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 240, 244}.
Sequence in context: A274023 A146872 A146792 * A052006 A002675 A333855
KEYWORD
sign
AUTHOR
Alexander Adamchuk, Nov 12 2006
EXTENSIONS
a(13)-a(50) from Robert Gerbicz, Nov 22 2010
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 June 8 09:36 EDT 2024. Contains 373217 sequences. (Running on oeis4.)