cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A120451 #11 Jan 26 2021 05:56:31
%S A120451 0,3,4,7,9,12,13,16,18,20,23,30,32,32,33,42,43,51,50,57,64,61,69,83,
%T A120451 84,93,89,92,110,115,114,123,133,133,153,143,157,154,163,176,179,211,
%U A120451 197,220,233,216,227,230,233,269,278,268,310,274,314
%N 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.
%C A120451 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.
%e A120451 a(12)=30 because 37 (the 12th prime) can be expressed as
%e A120451 2*(1 - 2) + 3*13
%e A120451 OR 2*(1 - 11) + 3*19
%e A120451 OR 2*(1 - 17) + 3*23
%e A120451 OR 2*(1 - 29) + 3*31
%e A120451 OR 2*(2 - 3) + 3*13
%e A120451 OR 2*(3 - 1) + 3*11
%e A120451 OR 2*(3 - 13) + 3*19
%e A120451 OR 2*(3 - 19) + 3*23
%e A120451 OR 2*(3 - 31) + 3*31
%e A120451 OR 2*(5 - 3) + 3*11
%e A120451 OR 2*(7 - 5) + 3*11
%e A120451 OR 2*(7 - 17) + 3*19
%e A120451 OR 2*(7 - 23) + 3*23
%e A120451 OR 2*(11 - 3) + 3*7
%e A120451 OR 2*(13 - 2) + 3*5
%e A120451 OR 2*(13 - 5) + 3*7
%e A120451 OR 2*(13 - 11) + 3*11
%e A120451 OR 2*(13 - 23) + 3*19
%e A120451 OR 2*(13 - 29) + 3*23
%e A120451 OR 2*(17 - 3) + 3*3
%e A120451 OR 2*(19 - 2) + 3*1
%e A120451 OR 2*(19 - 5) + 3*3
%e A120451 OR 2*(19 - 11) + 3*7
%e A120451 OR 2*(19 - 17) + 3*11
%e A120451 OR 2*(19 - 29) + 3*19
%e A120451 OR 2*(31 - 17) + 3*3
%e A120451 OR 2*(31 - 23) + 3*7
%e A120451 OR 2*(31 - 29) + 3*11
%e A120451 OR 2*(37 - 23) + 3*3
%e A120451 OR 2*(37 - 29) + 3*7.
%o A120451 (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
%K A120451 nonn
%O A120451 1,2
%A A120451 _Vassilis Papadimitriou_, Jul 20 2006