OFFSET
1,4
COMMENTS
Conjecture: a(n)>0 for all n>2.
This has been verified for n up to 10^7.
Except for p=1, all practical numbers are even. Thus, (n-p,n+p) prime is possible only if n is odd, and (n-p,n+p) can be practical only if n is even (except for p=1). - M. F. Hasler, Jan 19 2013
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
G. Melfi, On two conjectures about practical numbers, J. Number Theory 56 (1996) 205-210 [MR96i:11106].
Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588 [math.NT], 2012-2017.
EXAMPLE
a(8)=1 since 4, 8-4 and 8+4 are all practical.
a(13)=1 since 6 is practical, and 13-6 and 13+6 are both prime.
MATHEMATICA
f[n_]:=f[n]=FactorInteger[n]
Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2])
Con[n_]:=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}]
pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0)
a[n_]:=a[n]=Sum[If[pr[p]==True&&((PrimeQ[n-p]==True&&PrimeQ[n+p]==True)||(pr[n-p]==True&&pr[n+p]==True)), 1, 0], {p, 1, n-1}]
Do[Print[n, " ", a[n]], {n, 1, 100}]
PROG
(PARI) A209312(n)=sum(p=1, n-1, is_A005153(p) && ((is_A005153(n-p) && is_A005153(n+p)) || (isprime(n-p) && isprime(n+p)))) \\ (Could be made more efficient by separating the case of odd and even n.) - M. F. Hasler, Jan 19 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jan 19 2013
STATUS
approved