OFFSET
1,1
EXAMPLE
a(1)=2 because 2 and 5 are primes (A000040),
a(2)=4 because 4 and 9 are semiprimes (A001358),
a(3)=52 because the pair, 52 and 105, are 3-almost primes (A014612) and they are the least such pair,
a(4)=40 because the pair, 40 and 81, are 4-almost primes (A014613) and they are the least such pair, etc.
MAPLE
with(numtheory);
A211169:=proc(q)
local a, b, c, d, g, f, i, j, n;
for j from 1 to q do for n from 1 to q do
a:=ifactors(n)[2]; b:=nops(a); c:=ifactors(2*n+1)[2]; d:=nops(c); g:=0; f:=0;
for i from 1 to b do g:=g+a[i][2]; od; for i from 1 to d do f:=f+c[i][2]; od;
if g=f and g=j then print(n); break;
fi; od; od; end:
A211169(1000000000000);
MATHEMATICA
t = Table[0, {20}]; k = 2; While[k < 2700000001, x = PrimeOmega[k]; If[ t[[x]] == 0 && PrimeOmega[ 2k + 1] == x, t[[x]] = k; Print[{x, k}]]; k++]; t
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(15)-a(24) from Giovanni Resta, Jan 31 2013
STATUS
approved