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.

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