[go: up one dir, main page]

login
Numbers that can be represented as 2*p + 3*q, where p and q are prime.
8

%I #21 Mar 19 2015 09:38:16

%S 10,12,13,15,16,19,20,21,23,25,27,28,29,31,32,35,37,39,40,41,43,44,45,

%T 47,49,52,53,55,57,59,61,63,64,65,67,68,71,73,75,77,79,80,83,85,88,89,

%U 91,92,93,95,97,99,100,101,103,107,109,112,113,115,117,119,121,124,125,127

%N Numbers that can be represented as 2*p + 3*q, where p and q are prime.

%C The primes p and q may be the same.

%H Zak Seidov, <a href="/A079026/b079026.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = 2*p + 3*q, for some primes p and q.

%F a(n) > 3n + O(n/log n). - _Charles R Greathouse IV_, Dec 04 2012

%e 13 = 2*2 + 3*3, with p = 2 and q = 3.

%t mx = 130; Union@ Flatten@ Table[ 2Prime[i] + 3Prime[j], {i, PrimePi[mx/2]}, {j, PrimePi[(mx - 2Prime[i])/3]}] (* _Robert G. Wilson v_, Dec 12 2012 *)

%o (PARI) for(i=1,200, for(j=1,i/2,k=floor((i-2*j)/3); if(i-2*j-3*k,if(isprime(j),if(isprime(k),print(i); break,)))))

%o (PARI) list(lim)=my(v=vectorsmall(lim\1),u=List());forprime(p=2,lim\2, forprime(q=2,(lim-2*p)\3,v[2*p+3*q]=1));for(i=1,#v, if(v[i], listput(u,i))); Vec(u) \\ _Charles R Greathouse IV_, Dec 03 2012

%K easy,nonn

%O 1,1

%A _Randy L. Ekl_, Feb 01 2003

%E Missing term, 100 (equal to 2 * 47 + 3 * 2), added by _Zak Seidov_, Dec 02 2012