%I
%S 0,0,0,0,1,0,1,2,2,3,2,3,1,2,3,5,3,3,1,4,2,4,3,5,3,3,4,4,3,4,1,3,4,5,
%T 5,7,3,1,4,6,4,7,2,4,4,5,3,8,3,4,5,6,3,6,5,6,4,4,5,9,3,2,4,7,6,10,3,6,
%U 4,6,6,10,3,3,7,7,7,9,4,6
%N Number of primes p < n such that np1 and n+p+1 are both prime or both practical.
%C Conjecture: a(n) > 0 for all n > 6. Also, for any integer n > 2, there is a prime p < n such that n(p1) and n+(p1) are both prime or both practical.
%C Note that 1 is the only odd practical number and 2 is the only even prime.
%H ZhiWei Sun, <a href="/A261653/b261653.txt">Table of n, a(n) for n = 1..10000</a>
%H G. Melfi, <a href="http://dx.doi.org/10.1006/jnth.1996.0012">On two conjectures about practical numbers</a>, J. Number Theory 56 (1996) 205210 [<a href="http://www.ams.org/mathscinetgetitem?mr=1370203">MR96i:11106</a>].
%H ZhiWei Sun, <a href="http://arxiv.org/abs/1211.1588">Conjectures involving primes and quadratic forms</a>, arXiv:1211.1588 [math.NT], 20122015.
%e a(31) = 1 since 11, 31111 = 19 and 31+11+1 = 43 are all prime.
%e a(38) = 17 since 17 is prime, and 38171 = 20 and 38+17+1 = 56 are both practical.
%t f[n_]:=FactorInteger[n]
%t Pow[n_, i_]:=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
%t Con[n_]:=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]1}]
%t pr[n_]:=n>0&&(n<3Mod[n, 2]+Con[n]==0)
%t p[n_]:=Prime[n]
%t Do[r=0;Do[If[(PrimeQ[np[k]1]&&PrimeQ[n+p[k]+1])(pr[np[k]1]&&pr[n+p[k]+1]),r=r+1],{k,1,PrimePi[n1]}];Print[n," ",r];Continue,{n,1,80}]
%Y Cf. A000040, A005153, A208243, A209315, A209320, A209312, A261627, A261641.
%K nonn
%O 1,8
%A _ZhiWei Sun_, Aug 28 2015
