login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239675 Least k > 0 such that p(n)+k is prime, where p(n) is the number of partitions of n. 5
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

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

LINKS

Sean A. Irvine, Table of n, a(n) for n = 0..9999

Zhi-Wei Sun, Problems on combinatorial properties of primes, arXiv:1402.6641 [math.NT], 2014-2016. See Conjecture 4.1(i).

EXAMPLE

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

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

PROG

(PARI) s=[]; for(n=0, 100, k=1; while(!isprime(numbpart(n)+k), k++); s=concat(s, k)); s \\ Colin Barker, Mar 26 2014

CROSSREFS

Cf. A000009, A000040, A000041, A238457, A239736, A240545.

Sequence in context: A126768 A261872 A021450 * A289827 A092188 A097884

Adjacent sequences:  A239672 A239673 A239674 * A239676 A239677 A239678

KEYWORD

nonn

AUTHOR

Sean A. Irvine, Mar 23 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 15:02 EDT 2019. Contains 323443 sequences. (Running on oeis4.)