cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, May 10 2008

Keywords

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

Crossrefs

Programs

  • 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
  • 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

Extensions

More terms from R. J. Mathar, May 12 2008
All terms corrected by Felix Fröhlich, Apr 21 2021