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-4 of 4 results.

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 *)

A223893 Number of partitions of n into at most three distinct primes.

Original entry on oeis.org

0, 1, 1, 0, 2, 0, 2, 1, 1, 2, 1, 2, 2, 2, 2, 3, 1, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 4, 4, 5, 6, 5, 5, 5, 5, 7, 6, 5, 7, 4, 7, 7, 8, 7, 7, 6, 10, 8, 9, 9, 8, 7, 12, 8, 12, 8, 10, 6, 14, 9, 15, 8, 13, 7, 14, 11, 16, 8, 14, 7, 19, 11, 19, 10, 15, 9, 21, 12, 20, 11, 18
Offset: 1

Views

Author

Frank M Jackson, Mar 28 2013

Keywords

Comments

The sequence shows a stronger version of the Goldbach conjecture that for n > 6, n has partitions with at most three distinct primes.

Examples

			a(21)=3 as 21 = 2+19 = 3+5+13 = 3+7+11.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Length@Select[IntegerPartitions[n, 3, Prime@Range@PrimePi@n],
    Sort@#==Union@# &]; Array[a, 100] (* Giovanni Resta, Mar 29 2013 *)

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

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 3, 2, 3, 2, 3, 3, 4, 3, 4, 3, 5, 5, 6, 5, 5, 5, 6, 6, 6, 5, 4, 6, 6, 9, 7, 7, 6, 8, 7, 10, 6, 8, 5, 10, 8, 12, 9, 10, 7, 13, 9, 14, 10, 12, 7, 15, 9, 17, 9, 13, 6, 17, 10, 21, 10, 15, 8, 19, 11, 22, 9, 16, 8, 24, 12, 25, 12, 19, 10, 26, 12
Offset: 1

Views

Author

Frank M Jackson, Mar 26 2013

Keywords

Comments

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

Examples

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

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]]&&Total[Intersection[parts[[n]]]]==Total[parts
      [[1]]], count++]; n++]; count); Table[goldbachcount[i], {i, 1, 100}]

A205598 The number n written using a minimizing algorithm in the base where the values of the places are 1 and primes.

Original entry on oeis.org

0, 1, 10, 11, 101, 110, 111, 1010, 1011, 1101, 1110, 1111, 10110, 10111, 11010, 11011, 11101, 11110, 11111, 101011, 101101, 101110, 101111, 110110, 110111, 111010, 111011, 111101, 111110, 111111, 1011110, 1011111
Offset: 0

Views

Author

Frank M Jackson, Feb 08 2012

Keywords

Comments

Any nonnegative number can be written as a sum of distinct primes + e, where e is 0 or 1 (see A007924, which uses a greedy algorithm for writing n). However in this sequence a(n) is generated by using a minimizing algorithm that gives the smallest binary vector for select members from the sequence Q = (1 union primes) that when summed gives n. Without the minimizing condition there is ambiguity -- for example, 8 = 7+1 = 5+3 = 5+2+1 has three representations.

Examples

			8 = 7+1 = 5+3 = 5+2+1, so a(8) = 1011.
		

Crossrefs

Programs

  • Mathematica
    aprime[n_] := If[n==0, 1, Prime[n]]; seqtable[l_] := (stable=Table[aprime[j], {j, 0, l}]; stable); inttable[p_] := (itable=Reverse[IntegerDigits[p, 2]]; itable); h=1; otable={0}; ttable={}; While[h<100, (inttable[h]; seqtable[Length[itable]-1]; test=itable.stable; If[!MemberQ[ttable, test], AppendTo[otable, h], Null]; AppendTo[ttable, test]; h++)]; IntegerString[otable, 2]

Formula

Let Q be the ordered sequence of (1 union primes), then a(n) x Q = n, where x is the inner product and the binary vector a(n) is in ascending powers of 2 with infinite trailing zeros.
Showing 1-4 of 4 results.