A240545 Least k > 0 such that n + p(k) is prime, where p(k) is the number of partitions of k.
2, 1, 1, 2, 1, 2, 1, 8, 3, 2, 1, 2, 1, 9, 3, 2, 1, 2, 1, 8, 3, 2, 1, 9, 4, 8, 3, 2, 1, 2, 1, 8, 4, 11, 3, 2, 1, 8, 3, 2, 1, 2, 1, 9, 3, 2, 1, 10, 4, 8, 3, 2, 1, 9, 4, 10, 3, 2, 1, 2, 1, 8, 4, 15, 3, 2, 1, 8, 3, 2, 1, 2, 1, 9, 4, 8, 3, 2, 1, 8, 3, 2
Offset: 0
Keywords
Examples
a(7)=8 because k=8 is the smallest k such that 7+A000041(k) is prime.
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, 2014. See Conjecture 4.1(ii).
Programs
-
Mathematica
a[n_] := For[k = 1, True, k++, If[PrimeQ[n + PartitionsP[k]], Return[k]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Dec 15 2018 *)
Comments