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-10 of 11 results. Next

A238509 a(n) = |{0 < k < n: p(n) + p(k) - 1 is prime}|, where p(.) is the partition function (A000041).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 2, 1, 1, 2, 1, 2, 3, 4, 1, 4, 5, 2, 1, 5, 2, 1, 1, 3, 5, 2, 3, 2, 2, 4, 7, 3, 2, 2, 5, 6, 3, 7, 3, 3, 4, 3, 3, 2, 2, 4, 7, 4, 8, 3, 9, 4, 6, 4, 3, 7, 3, 2, 3, 4, 5, 3, 7, 4, 3, 5, 1, 9, 10, 6, 8, 2, 3, 3, 6, 6, 3, 1, 2, 7, 1, 6, 5, 2, 6, 8, 3, 4, 1, 1, 1, 9, 12, 3, 2, 3, 8, 4, 3, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 27 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. Also, if n > 2 is different from 8 and 25, then p(n) + p(k) + 1 is prime for some 0 < k < n.
(ii) If n > 7, then n + p(k) is prime for some 0 < k < n.
(iii) If n > 1, then p(k) + q(n) is prime for some 0 < k < n, where q(.) is the strict partition function given by A000009. If n > 2, then p(k) + q(n) - 1 is prime for some 0 < k < n. If n > 1 is not equal to 8, then p(k) + q(n) + 1 is prime for some 0 < k < n.

Examples

			a(11) = 1 since p(11) + p(10) - 1 = 56 + 42 - 1 = 97 is prime.
a(247) = 1 since p(247) + p(228) - 1 = 182973889854026 + 40718063627362 - 1 = 223691953481387 is prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_,k_]:=PrimeQ[PartitionsP[n]+PartitionsP[k]-1]
    a[n_]:=Sum[If[p[n,k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A238393 a(n) = |{0 < k <= n: 2*p(k)*p(n) + 1 is prime}|, where p(.) is the partition function (A000041).

Original entry on oeis.org

1, 1, 3, 2, 3, 2, 5, 2, 6, 3, 3, 5, 1, 9, 3, 4, 5, 5, 6, 2, 7, 3, 5, 8, 3, 4, 8, 10, 7, 10, 6, 7, 9, 8, 8, 6, 6, 4, 12, 10, 10, 8, 6, 6, 5, 7, 8, 6, 10, 5, 9, 9, 11, 7, 7, 6, 9, 11, 8, 7, 11, 6, 9, 8, 4, 8, 5, 18, 14, 10, 9, 7, 8, 6, 13, 9, 4, 7, 7, 15
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 01 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 13.
(ii) If n > 1, then 2*p(k)*p(n) - 1 is prime for some 0 < k < n.
(iii) For any integer n > 0, p(k)*(p(n)+1) + 1 is prime for some k = 1, ..., n.

Examples

			a(2) = 1 since 2*p(1)*p(2) + 1 = 2*1*2 + 1 = 5 is prime.
a(13) = 1 since 2*p(3)*p(13) + 1 = 2*3*101 + 1 = 607 is prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_,k_]:=PrimeQ[2*PartitionsP[n]*PartitionsP[k]+1]
    a[n_]:=Sum[If[p[n,k],1,0],{k,1,n}]
    Table[a[n],{n,1,80}]

A238516 a(n) = |{0 < k < n: (p(k)+1)*p(n) + 1 is prime}|, where p(.) is the partition function (A000041).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 3, 3, 4, 5, 5, 2, 4, 6, 5, 3, 3, 3, 4, 1, 7, 7, 2, 6, 3, 8, 7, 4, 1, 6, 3, 4, 5, 8, 4, 4, 2, 2, 4, 9, 7, 6, 3, 6, 4, 2, 6, 6, 3, 8, 5, 6, 4, 7, 7, 4, 8, 7, 9, 1, 6, 7, 7, 3, 3, 7, 2, 5, 4, 10, 8, 5, 1, 8, 9, 1, 4, 6, 7, 12, 3, 2, 4, 10, 4, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 28 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. Also, for any integer n > 4 there is a positive integer k < n with (p(k)-1)*p(n) - 1 prime.
(ii) Let q(.) be the strict partition function (A000009). If n > 5, then p(n)*q(k) + 1 is prime for some 3 < k < n. If n > 6, then p(n)*q(k) - 1 is prime for some 0 < k < n. If n > 1, then q(n)*q(k) + 1 is prime for some 0 < k < n. If n > 3, then q(n)*q(k) - 1 is prime for some 0 < k < n.
We have verified that a(n) > 0 for all n = 2, 3, ..., 60000.

Examples

			a(4) = 1 since (p(1)+1)*p(4) + 1 = 2*5 + 1 = 11 is prime.
a(20) = 1 since (p(12)+1)*p(20) + 1 = 78*627 + 1 = 48907 is prime.
a(246) = 1 since (p(45)+1)*p(246) + 1 = 89135*169296722391554 + 1 = 15090263350371165791 is prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_,k_]:=PrimeQ[PartitionsP[n]*(PartitionsP[k]+1)+1]
    a[n_]:=Sum[If[p[n,k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

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

A239209 a(n) = |{0 < k < n: k*p(n)*(p(n)-1) + 1 is prime}|, where p(.) is the partition function (A000041).

Original entry on oeis.org

0, 1, 2, 2, 2, 1, 4, 2, 3, 3, 3, 2, 3, 4, 2, 4, 4, 4, 8, 3, 3, 4, 6, 5, 3, 5, 10, 4, 4, 7, 5, 4, 3, 8, 7, 6, 3, 4, 5, 4, 3, 7, 5, 5, 3, 4, 5, 11, 7, 10, 3, 10, 8, 12, 6, 4, 10, 4, 8, 5, 11, 7, 5, 14, 5, 7, 4, 10, 1, 10, 9, 12, 8, 5, 10, 1, 7, 7, 6, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 12 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. If n > 1 is not equal to 25, then k*p(n)*(p(n)+1) - 1 is prime for some 0 < k < n.
(ii) Let q(.) be the strict partition function given by A000009. Then, for any integer n > 2, there is a number k among 1, ..., n with k*q(n)^2 - 1 prime. Also, we may replace k*q(n)^2 - 1 by k*q(n)^2 + 1 or k*q(n)*(q(n)+1) + 1 or k*q(n)*(q(n)+1) - 1.
We have verified that a(n) > 0 for all n = 2..10^5.

Examples

			a(2) = 1 since 1*p(2)*(p(2)-1) + 1 = 1*2*1 + 1 = 3 is prime.
a(6) = 1 since 3*p(6)*(p(6)-1) + 1 = 3*11*10 + 1 = 331 is prime.
a(69) = 1 since 50*p(69)*(p(69)-1) + 1 =  50*3554345*3554344 + 1 = 631668241234001 is prime.
a(76) = 1 since 24*p(76)*(p(76)-1) + 1 = 24*9289091*9289090 + 1 = 2070892855612561 is prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PartitionsP[n]
    f[n_]:=p[n]*(p[n]-1)
    a[n_]:=Sum[If[PrimeQ[k*f[n]+1],1,0],{k,1,n-1}]
    Table[a[n],{n,1,80}]

A239214 a(n) = |{0 < k < n: p(k)*p(n)*(p(n)+1) - 1 is prime}|, where p(.) is the partition function (A000041).

Original entry on oeis.org

0, 1, 2, 3, 1, 3, 3, 2, 3, 3, 5, 4, 4, 3, 3, 6, 2, 4, 5, 4, 1, 2, 3, 6, 6, 6, 2, 4, 6, 9, 2, 7, 8, 6, 6, 2, 2, 2, 10, 4, 4, 7, 5, 7, 1, 4, 9, 9, 9, 4, 6, 8, 7, 8, 6, 4, 13, 10, 3, 6, 10, 7, 13, 12, 12, 8, 6, 8, 5, 11, 5, 3, 4, 5, 11, 7, 6, 12, 16, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 12 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1.
(ii) For each n = 2, 3, ... there is a positive integer k < n with p(k)*p(n)*(p(n)-1) + 1 prime. If n > 2, then p(k)*p(n)*(p(n)-1)-1 is prime for some 0 < k < n.
(iii) For any n > 1, there is a positive integer k < n with 2*p(k)*p(n)*A000009(n)*A047967(n) + 1 prime.
We have verified that a(n) > 0 for all n = 2, ..., 10^5.

Examples

			a(2) = 1 since p(1)*p(2)*(p(2)+1) - 1 = 1*2*3 - 1 = 5 is prime.
a(5) = 1 since p(3)*p(5)*(p(5)+1) - 1 = 3*7*8 - 1 = 167 is prime.
a(21) = 1 since p(10)*p(21)*(p(21)+1) - 1 = 42*792*793 - 1 = 26378351 is prime.
a(45) = 1 since p(20)*p(45)*(p(45)+1) - 1 = 627*89134*89135 - 1 = 4981489349429 is prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PartitionsP[n]
    f[n_]:=p[n]*(p[n]+1)
    a[n_]:=Sum[If[PrimeQ[p[k]*f[n]-1],1,0],{k,1,n-1}]
    Table[a[n],{n,1,80}]

A238458 Number of primes p < n with 2*P(n-p) + 1 prime, where P(.) is the partition function (A000041).

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 2, 3, 4, 2, 3, 3, 3, 5, 2, 4, 4, 5, 4, 5, 4, 4, 3, 3, 3, 4, 4, 4, 2, 4, 2, 5, 4, 4, 5, 3, 3, 6, 3, 4, 1, 3, 4, 7, 6, 4, 4, 4, 4, 4, 4, 5, 3, 5, 5, 7, 3, 3, 4, 6, 5, 8, 5, 5, 4, 4, 2, 7, 5, 7, 3, 6, 5, 7, 6, 7, 5, 5, 4, 7, 4, 5, 3, 5, 6, 8, 5, 3, 4, 6, 3, 5, 4, 5, 4, 5, 2, 6, 4, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 27 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2. Also, for each n > 3 there is a prime p < n with 2*P(n-p) - 1 prime.
We have verified the conjecture for n up to 10^5.
See also A238459 for a similar conjecture involving the strict partition function.

Examples

			a(3) = 1 since 2 and 2*P(3-2) + 1 = 2*1 + 1 = 3 are both prime.
a(41) = 1 since 37 and 2*P(41-37) + 1 = 2*5 + 1 = 11 are both prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_,k_]:=PrimeQ[2*PartitionsP[n-Prime[k]]+1]
    a[n_]:=Sum[If[p[n,k],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,100}]

A238459 Number of primes p < n with q(n-p) + 1 prime, where q(.) is the strict partition function (A000009).

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 2, 3, 3, 2, 3, 2, 5, 3, 5, 4, 4, 3, 4, 4, 6, 2, 4, 3, 5, 2, 4, 1, 4, 5, 6, 5, 5, 4, 5, 3, 4, 3, 5, 6, 5, 6, 3, 8, 6, 5, 6, 4, 6, 7, 5, 6, 4, 6, 7, 6, 7, 7, 6, 6, 7, 5, 6, 5, 6, 5, 5, 5, 7, 7, 6, 5, 7, 9, 8, 6, 5, 5, 7, 6, 8, 6, 5, 8, 7, 8, 7, 4, 8, 7, 7, 7, 6, 6, 6, 6, 6, 7, 6, 9
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 27 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2. Also, for each n > 6 there is a prime p < n with q(n-p) - 1 prime.
We have verified the conjecture for n up to 10^5.
See also A238458 for a similar conjecture involving the partition function p(n).

Examples

			a(3) = 1 since 2 and q(3-2) + 1 = 1 + 1 = 2 are both prime.
a(28) = 1 since 17 and q(28-17) + 1 = q(11) + 1 = 12 + 1 = 13 are both prime.
		

Crossrefs

Programs

  • Mathematica
    q[n_,k_]:=PrimeQ[PartitionsQ[n-Prime[k]]+1]
    a[n_]:=Sum[If[q[n,k],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,100}]

A238577 a(n) = |{0 < k <= n: p(n)*q(k)*r(k) + 1 is prime}|, where p(.), q(.) and r(.) are given by A000041, A000009 and A047967 respectively.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 4, 3, 4, 3, 7, 4, 5, 6, 4, 4, 6, 4, 7, 1, 4, 6, 2, 8, 6, 6, 5, 4, 5, 4, 8, 5, 9, 3, 4, 2, 3, 10, 5, 11, 5, 10, 5, 6, 3, 6, 8, 7, 9, 6, 6, 3, 10, 3, 9, 9, 6, 10, 8, 8, 7, 4, 6, 6, 6, 5, 3, 9, 4, 8, 12, 5, 2, 8, 8, 3, 6, 10, 9, 9
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 01 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 3, 5, 20. If n > 2, then p(n)*q(k)*r(k) - 1 is prime for some k = 1, ..., n.
(ii) If n > 2 is not equal to 22, then p(n)*q(n)*q(k) - 1 is prime for some k = 1, ..., n. If n > 13, then p(n)*q(k)*q(n-k) - 1 is prime for some 1 < k < n/2.

Examples

			a(5) = 1 since p(5)*q(4)*r(4) + 1 = 7*2*3 + 1 = 43 is prime.
a(20) = 1 since p(20)*q(13)*r(13) + 1 = 627*18*83 + 1 = 936739 is prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_,k_]:=PrimeQ[PartitionsP[n]*PartitionsQ[k]*(PartitionsP[k]-PartitionsQ[k])+1]
    a[n_]:=Sum[If[p[n,k],1,0],{k,1,n}]
    Table[a[n],{n,1,80}]

A239232 a(n) = |{0 < k <= n: p(n+k) + 1 is prime}|, where p(.) is the partition function (A000041).

Original entry on oeis.org

1, 0, 0, 1, 3, 3, 3, 2, 1, 1, 1, 1, 2, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 3, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 4, 5, 5, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 6, 6, 6, 6, 7, 8, 8, 9, 9, 9, 10
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 13 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 3.
(ii) If n > 15, then p(n+k) - 1 is prime for some k = 1, ..., n.
(iii) If n > 38, then p(n+k) is prime for some k = 1, ..., n.
The conjecture implies that there are infinitely many positive integers m with p(m) + 1 (or p(m) - 1, or p(m)) prime.

Examples

			a(4) = 1 since p(4+4) + 1 = 22 + 1 = 23 is prime.
a(8) = 2 since p(8+1) + 1 = 31 and p(8+2) + 1 = 43 are both prime.
a(11) = 1 since p(11+8) + 1 = 491 is prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PartitionsP[n]
    a[n_]:=Sum[If[PrimeQ[p[n+k]+1],1,0],{k,1,n}]
    Table[a[n],{n,1,80}]
Showing 1-10 of 11 results. Next