OFFSET
1,3
EXAMPLE
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}.
KEYWORD
sign
AUTHOR
Alexander Adamchuk, Nov 12 2006
EXTENSIONS
a(13)-a(50) from Robert Gerbicz, Nov 22 2010
STATUS
approved