login
A138508
Semiprime analog of Riesel problem: start with n; repeatedly double and add 1 until reach a semiprime. Sequence gives number of steps to reach a semiprime or 0 if no semiprime is ever reached.
1
3, 5, 2, 1, 4, 3, 1, 2, 2, 1, 3, 1, 2, 3, 5, 1, 1, 4, 1, 4, 2, 2, 2, 1, 1, 3, 1, 1, 2, 2, 4, 1, 4, 1, 2, 3, 3, 1, 2, 3, 3, 1, 1, 7, 1, 1, 1, 3, 4, 2, 3, 10, 2, 2, 1, 6, 1, 2, 1, 1, 1, 4, 3, 1, 3, 1, 3, 3, 3, 1, 1, 1, 2, 2, 2, 5, 1, 4, 1, 1, 2, 6, 2, 1, 3, 3, 3, 1, 6, 5, 1, 1, 1, 5, 3, 5, 2, 2, 3, 1, 1, 1, 2, 1, 9, 1, 1, 1, 1, 1, 2
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
Sequence in context: A161865 A145325 A282194 * A353712 A308180 A329633
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