A239232 a(n) = |{0 < k <= n: p(n+k) + 1 is prime}|, where p(.) is the partition function (A000041).
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
Keywords
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.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014.
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}]
Comments