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.

A218007 Number of partitions of n into at most three primes (including 1).

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 5, 4, 5, 4, 5, 4, 6, 5, 7, 5, 7, 5, 8, 6, 9, 6, 9, 7, 10, 7, 10, 5, 10, 6, 12, 7, 13, 7, 12, 8, 14, 7, 14, 6, 15, 8, 17, 9, 17, 8, 18, 10, 19, 10, 19, 7, 20, 9, 21, 9, 20, 7, 21, 11, 25, 11, 24, 9, 26, 11, 27, 9, 24, 8, 28, 12, 30, 13, 29
Offset: 1

Views

Author

Frank M Jackson, Mar 26 2013

Keywords

Comments

The above sequence relies on the strong Goldbach's conjecture that any positive integer is the sum of at most three distinct terms from {1 union primes}.

Examples

			a(21)=9 as 21 = 1+1+19 = 2+19 = 1+3+17 = 2+2+17 = 1+7+13 = 3+5+13 = 3+7+11 = 5+5+11 = 7+7+7
		

Crossrefs

Programs

  • Mathematica
    primeQ[p0_] := If[p0==1, True, PrimeQ[p0]]; SetAttributes[primeQ, Listable]; goldbachcount[p1_] := (parts=IntegerPartitions[p1, 3]; count=0; n=1; While[n<=Length[parts], If[Intersection[Flatten[primeQ[parts[[n]]]]][[1]] == True, count++]; n++]; count); Table[goldbachcount[i], {i, 1, 100}]
    Table[Length[Select[#/.(1->2)&/@IntegerPartitions[n,3],AllTrue[#,PrimeQ]&]],{n,80}] (* Harvey P. Dale, Jan 11 2023 *)