login
The OEIS is supported by the many generous donors 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
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
Sequence in context: A126768 A261872 A021450 * A289827 A092188 A340675
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 7 08:34 EDT 2024. Contains 372300 sequences. (Running on oeis4.)