OFFSET
4,3
COMMENTS
This sequence counts the cases such that prime(n) = p1 + p2 - MaxOddPrimeFactor(p1-p2), where MaxOddPrimeFactor(m) is defined as the maximum odd prime factor of the positive integer m. If there is no odd prime factor of m, MaxOddPrimeFactor(m) is defined as 1.
Conjecture: a(n) > 0 when n >= 4.
Some nonprime odd numbers, like 27, cannot be partitioned into the form of p1 + p2 - MaxOddPrimeFactor(p1-p2).
EXAMPLE
When n=4, prime(4)=7, MaxOddPrimeFactor(5-3)=1, 7=5+3-1. This is the only case, so a(4)=1.
When n=5, prime(5)=11, MaxOddPrimeFactor(7-5)=1, 11=7+5-1. This is the only case, so a(5)=1.
When n=6, prime(6)=13, MaxOddPrimeFactor(11-3)=1, 13=11+3-1; and MaxOddPrimeFactor(11-5)=3, 13=11+5-3. Two cases found, so a(6)=2.
MATHEMATICA
MaxOddPrimeFactor[m_] :=
Module[{factors, l, res}, factors = FactorInteger[m];
l = Length[factors]; res = factors[[l, 1]]; If[res == 2, res = 1];
res]
Table[p = Prime[n]; p1 = NextPrime[p/2, -1]; ct = 0;
While[p1 = NextPrime[p1]; p1 < p, p2 = NextPrime[p - p1, -1];
While[p2 = NextPrime[p2]; p2 < p1,
If[p == (p1 + p2 - MaxOddPrimeFactor[p1 - p2]), ct++]]]; ct, {n, 4,
79}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Lei Zhou, Aug 17 2020
STATUS
approved