A239207 a(n) = |{0 < k <= n: k*p(n)*q(n)*r(n) - 1 is prime}|, where p(.), q(.) and r(.) are given by A000041, A000009 and A047967 respectively.
0, 1, 3, 3, 4, 3, 2, 5, 4, 4, 2, 3, 2, 3, 5, 6, 3, 4, 2, 3, 5, 4, 1, 6, 2, 7, 3, 5, 5, 3, 5, 8, 7, 1, 7, 3, 8, 5, 11, 7, 7, 2, 6, 7, 3, 7, 7, 5, 5, 9, 7, 7, 4, 4, 6, 5, 9, 7, 8, 11, 4, 5, 6, 8, 5, 10, 5, 6, 9, 7, 10, 6, 5, 5, 10, 9, 8, 3, 4, 1
Offset: 1
Keywords
Examples
a(2) = 1 since 2*p(2)*q(2)*r(2) - 1 = 2*2*1*1 - 1 = 3 is prime. a(23) = 1 since 12*p(23)*q(23)*r(23) - 1 = 12*1255*104*1151 - 1 = 1802742239 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.
Programs
-
Mathematica
p[n_]:=PartitionsP[n] q[n_]:=PartitionsQ[n] f[n_]:=p[n]*q[n]*(p[n]-q[n]) a[n_]:=Sum[If[PrimeQ[k*f[n]-1],1,0],{k,1,n}] Table[a[n],{n,1,80}]
Comments