OFFSET
1,2
COMMENTS
At least for the first 200 primes, it is true that every prime p > 2 can be expressed as 2*(p1-p2) + 3*p3, where p1, p2, p3 are primes or 1, less than or equal to p (the proof would be straightforward if both (a) Levy's conjecture and (b) the conjecture saying that every prime p > 3 can be expressed as 2*p1 + 3*p2, where p1, p2 are primes, were true). It would be interesting to study how the sequence changes when we remove the restriction for p1, p2, p3 to be less than or equal to p.
EXAMPLE
a(12)=30 because 37 (the 12th prime) can be expressed as
2*(1 - 2) + 3*13
OR 2*(1 - 11) + 3*19
OR 2*(1 - 17) + 3*23
OR 2*(1 - 29) + 3*31
OR 2*(2 - 3) + 3*13
OR 2*(3 - 1) + 3*11
OR 2*(3 - 13) + 3*19
OR 2*(3 - 19) + 3*23
OR 2*(3 - 31) + 3*31
OR 2*(5 - 3) + 3*11
OR 2*(7 - 5) + 3*11
OR 2*(7 - 17) + 3*19
OR 2*(7 - 23) + 3*23
OR 2*(11 - 3) + 3*7
OR 2*(13 - 2) + 3*5
OR 2*(13 - 5) + 3*7
OR 2*(13 - 11) + 3*11
OR 2*(13 - 23) + 3*19
OR 2*(13 - 29) + 3*23
OR 2*(17 - 3) + 3*3
OR 2*(19 - 2) + 3*1
OR 2*(19 - 5) + 3*3
OR 2*(19 - 11) + 3*7
OR 2*(19 - 17) + 3*11
OR 2*(19 - 29) + 3*19
OR 2*(31 - 17) + 3*3
OR 2*(31 - 23) + 3*7
OR 2*(31 - 29) + 3*11
OR 2*(37 - 23) + 3*3
OR 2*(37 - 29) + 3*7.
PROG
(PARI) a(n) = {my(vp = concat(1, primes(n)), nb=0, p=prime(n), p1, p2, p3); for (i=1, #vp, p1 = vp[i]; for (j=1, #vp, p2 = vp[j]; for (k=1, #vp, p3 = vp[k]; if (2*(p1-p2) + 3*p3 == p, nb++); ); ); ); nb; } \\ Michel Marcus, Jan 26 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Vassilis Papadimitriou, Jul 20 2006
STATUS
approved