A211169 The least n-almost Sophie Germain prime.
2, 4, 52, 40, 688, 4900, 63112, 178240, 38272, 5357056, 1997824, 247221760, 586504192, 707436544, 15582115840, 47145459712, 77620412416, 1871289057280, 17787921498112, 10891875057664, 146305150615552, 535618317844480, 15921951753109504, 39754688251297792
Offset: 1
Keywords
Examples
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.
Crossrefs
Programs
-
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
Extensions
a(15)-a(24) from Giovanni Resta, Jan 31 2013