login
A120451
Number of ways a prime number p can be expressed as 2*(p1-p2) + 3*p3, where p1, p2, p3 are primes or 1, less than or equal to p.
1
0, 3, 4, 7, 9, 12, 13, 16, 18, 20, 23, 30, 32, 32, 33, 42, 43, 51, 50, 57, 64, 61, 69, 83, 84, 93, 89, 92, 110, 115, 114, 123, 133, 133, 153, 143, 157, 154, 163, 176, 179, 211, 197, 220, 233, 216, 227, 230, 233, 269, 278, 268, 310, 274, 314
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
Sequence in context: A280493 A032729 A035270 * A327621 A060428 A352274
KEYWORD
nonn
AUTHOR
STATUS
approved