OFFSET
1,1
COMMENTS
This is the analog of A050412 with "prime" replaced by "semiprime". [Edited by Felix Fröhlich, Apr 21 2021]
a(n) is the smallest m>=0 such that (n+1)*2^m-1 is semiprime, or 0 if no such semiprime exists. - R. J. Mathar, May 12 2008
There is no "semiprime Riesel number" (i.e., n such that a(n) = 0) among all n up to 2*10^6. - Felix Fröhlich, Apr 21 2021
MAPLE
isA001358 := proc(n) RETURN( numtheory[bigomega](n) = 2) ; end:
A138508 := proc(n) local a, niter ; niter := n ; a := 0 ; while not isA001358(niter) do a := a+1 ; niter := 2*niter+1 ; od: a ; end:
seq(A138508(n), n=1..200) ; # R. J. Mathar, May 12 2008
PROG
(PARI) a(n) = my(x=n, i=0); while(1, x=2*x+1; i++; if(bigomega(x)==2, return(i))); \\ Felix Fröhlich, Apr 21 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, May 10 2008
EXTENSIONS
More terms from R. J. Mathar, May 12 2008
All terms corrected by Felix Fröhlich, Apr 21 2021
STATUS
approved