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.

A239675 Least k > 0 such that p(n)+k is prime, where p(n) is the number of partitions of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 2, 2, 1, 1, 1, 3, 2, 2, 2, 3, 2, 10, 4, 1, 4, 5, 7, 4, 4, 15, 1, 1, 1, 2, 19, 15, 4, 8, 13, 4, 4, 10, 2, 4, 1, 4, 15, 16, 6, 3, 5, 5, 10, 6, 7, 4, 20, 10, 4, 1, 6, 13, 3, 1, 14, 4, 25, 8, 21, 39, 29, 8, 2, 14, 1, 34, 16, 12, 17
Offset: 0

Views

Author

Sean A. Irvine, Mar 23 2014

Keywords

Comments

Conjecture of Zhi-Wei Sun: a(n) <= n for n > 0.

Examples

			a(3)=2 because p(3)=3 and p(3)+1=4 is composite, but p(3)+2=5 is prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = For[pn = PartitionsP[n]; k = 1, True, k++, If[PrimeQ[pn+k], Return[k]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jan 26 2019 *)
  • PARI
    s=[]; for(n=0, 100, k=1; while(!isprime(numbpart(n)+k), k++); s=concat(s, k)); s \\ Colin Barker, Mar 26 2014

A239936 Least k > 0 such that p(k)+q(n) is prime, where p(n) is the number of partitions of n and q(n) is the number of strict partitions of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 1, 2, 1, 1, 2, 4, 3, 1, 4, 3, 3, 10, 3, 4, 5, 2, 1, 1, 1, 6, 5, 5, 1, 6, 2, 4, 1, 12, 1, 15, 13, 1, 3, 5, 4, 4, 1, 5, 5, 1, 2, 1, 12, 49, 1, 1, 2, 6, 6, 3, 14, 3, 3, 3, 6, 6, 16, 13, 16, 11, 1, 1, 4, 5, 3, 12, 25
Offset: 0

Views

Author

Sean A. Irvine, Mar 29 2014

Keywords

Comments

Conjecture of Zhi-Wei Sun: a(n) < n for n > 1.

Examples

			a(5)=2 since q(5)+p(2)=3+2=5 is prime but q(5)+p(1)=4 is composite.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := For[k = 1, True, k++, If[PrimeQ[PartitionsP[k] + PartitionsQ[n]], Return[k]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 19 2019 *)
Showing 1-2 of 2 results.