cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A124885 Number of natural numbers that are not a sum of n distinct primes, or -1 if it is infinite.

Original entry on oeis.org

-1, -1, 12, 22, 34, 49, 68, 90, 117, 147, 180, 219
Offset: 1

Views

Author

Alexander Adamchuk, Nov 12 2006

Keywords

Comments

A124884(n) = {-1, -1, 17, 30, 41, 60, 83, 102, 137, 162, 203, 244, ...} Largest number that is not a sum of n distinct primes, or -1 if such a number does not exist.
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}.

Examples

			a(1) = -1 because there are an infinite number of nonprimes.
a(3) = 12 because 12 = Length[{1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 17}] = Length[A124868(n)], where A124868(n) are the natural numbers that are not the sum of 3 distinct primes.
		

Crossrefs

A178041 Number of ways to represent the n-th prime (which has a nonzero number of such representations) as the sum of 4 distinct primes.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 6, 6, 8, 10, 13, 14, 13, 18, 21, 17, 21, 30, 21, 32, 23, 37, 27, 45, 35, 34, 54, 43, 60, 61, 67, 44, 52, 55, 79, 58, 89, 57, 92, 100, 111, 69, 119, 76, 83, 122, 91, 89, 94, 102, 147, 146, 106, 159, 116, 176, 125, 190, 119, 195, 202, 136, 230, 148, 154, 222
Offset: 1

Views

Author

Jonathan Vos Post, May 17 2010

Keywords

Examples

			a(1) = 1 because 17 = 2+3+5+7 is the unique solution for the smallest such prime.
a(2) = 2 because 23 = 2+3+5+13 = 2+3+7+11 are the only two solutions for the 2nd smallest such prime.
a(3) = 3 because 29 = 2+3+5+19 = 2+3+7+17 = 2+3+11+13 are the only 3 solutions for the 3rd smallest such prime.
a(4) = 3 because 31 = 2+3+7+19 = 2+5+7+17 = 2+5+11+13 are the only 3 solutions for the 4th smallest such prime.
a(5) = 5 because 37 = 2+3+13+19 = 2+5+7+23 = 2+5+11+19 = 2+5+13+17 = 2+7+11+17 are the only 5 solutions for the 5th smallest such prime.
		

Crossrefs

Cf. A000040, A038609 (sum of 2 distinct primes), A124867 (sum of 3 distinct primes), A124868 (not the sum of 3 distinct primes), A124884 (not the sum of n distinct primes).

Programs

  • Mathematica
    max=367;lim=PrimePi[max];p4=Sort[Total/@Subsets[Prime[Range[lim]],{4}]];p4p=Select[p4,PrimeQ[#]&&#<=max&]; s={};Do[c=Count[p4p,Prime[p]];If[c>0,AppendTo[s,c]],{p,lim}];s (* James C. McMahon, Jan 11 2025 *)

Extensions

Extended by Zak Seidov
Showing 1-2 of 2 results.