A238458 Number of primes p < n with 2*P(n-p) + 1 prime, where P(.) is the partition function (A000041).
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
Keywords
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.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014
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}]
Comments