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.
%I A138508 #27 Apr 22 2021 22:13:51 %S A138508 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, %T A138508 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, %U A138508 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 %N 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. %C A138508 This is the analog of A050412 with "prime" replaced by "semiprime". [Edited by _Felix Fröhlich_, Apr 21 2021] %C A138508 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 %C A138508 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 %p A138508 isA001358 := proc(n) RETURN( numtheory[bigomega](n) = 2) ; end: %p A138508 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: %p A138508 seq(A138508(n),n=1..200) ; # _R. J. Mathar_, May 12 2008 %o A138508 (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 %Y A138508 Cf. A001358, A050412. %K A138508 easy,nonn %O A138508 1,1 %A A138508 _Jonathan Vos Post_, May 10 2008 %E A138508 More terms from _R. J. Mathar_, May 12 2008 %E A138508 All terms corrected by _Felix Fröhlich_, Apr 21 2021