login
Numbers expressible as 2*p + 3*q in exactly in one way, where p and q are primes.
6

%I #16 Dec 05 2012 14:21:02

%S 10,12,13,15,16,20,21,23,27,28,29,32,39,40,41,44,45,52,57,63,64,68,75,

%T 80,88,92,93,99,100,112,117,124,128,129,135,140,147,148,152,164,165,

%U 172,183,184,189,200,207,208,212,219,220,224,225,232,243,255,260

%N Numbers expressible as 2*p + 3*q in exactly in one way, where p and q are primes.

%C Sequence is infinite: All integers of the forms either 2*prime or 3*prime plus 6 are here.

%C Suggestion: all odd terms are multiples of 3 except for four primes 13, 23, 29, 41.

%H Zak Seidov, <a href="/A219956/b219956.txt">Table of n, a(n) for n = 1..10000</a>

%e 10 = 2*2 + 3*2, 12 = 2*3 + 3*2, 13 = 2*2 + 3*3.

%t mx = 260; Sort[First /@ Select[Tally[ Flatten@Table[2 Prime[i] + 3 Prime[k], {k, PrimePi[(mx - 4)/3]}, {i, PrimePi[(mx - 3 Prime[k])/2]}]], #[[2]] < 2 &]]

%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]++)); for(i=1, #v, if(v[i]==1, listput(u, i))); Vec(u) \\ _Charles R Greathouse IV_, Dec 05 2012

%Y Cf. A079026, A219955.

%K nonn

%O 1,1

%A _Zak Seidov_, Dec 02 2012