Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #10 Jul 11 2022 13:26:33
%S 1,6,9,21,17,33,45,51,75,99,111,93,105,135,153,201,165,249,231,237,
%T 321,225,273,363,411,393,285,315,471,483,435,405,465,555,681,495,783,
%U 675,873,849,963,1729,585,525,897,795,1041,915,735,855,1191,825,765,1095,975,1005,1035,1125,1311,1407
%N a(n) is the least positive number that can be represented in exactly n ways as 2*p+q where p and q are primes.
%C a(n) is the least number k such that A046926(k) = n.
%H Robert Israel, <a href="/A355484/b355484.txt">Table of n, a(n) for n = 0..2500</a>
%e a(3) = 21 because 21 can be written as 2*p+q with p and q prime in exactly 3 ways, namely 21 = 2*2+17 = 2*5+11 = 2*7+7, and no smaller number works.
%p M:= 3000: # to use primes up to M
%p P:= select(isprime,[2,seq(i,i=3..M,2)]): nP:= nops(P):
%p A:= Vector(M):
%p for i from 1 do
%p p:= P[i];
%p if 2*p >= M then break fi;
%p for j from 1 to nP do
%p q:= P[j];
%p v:= 2*p+q;
%p if v > M then break fi;
%p A[v]:= A[v]+1;
%p od od:
%p K:= max(A):
%p V:= Array(0..K+1):
%p for i from 1 to M do
%p if V[A[i]] = 0 then V[A[i]]:= i fi
%p od:
%p L:= min(select(t -> V[t] = 0, [$1..K+1])):
%p convert(V[0..L-1],list);
%Y Cf. A046926, A284052.
%K nonn
%O 0,2
%A _J. M. Bergot_ and _Robert Israel_, Jul 03 2022