%I #8 Aug 03 2014 14:01:30
%S 15,95,15,9,95,55,15,35,39,21,95,25,55,119,511,33,35,303,39,335,87,91,
%T 95,49,51,215,55,57,119,123,511,65,543,69,143,295,303,77,159,327,335,
%U 85,87,5759,91,93,95,391,799,203,415,54271,215,219,111,3647,115
%N Start with n, apply k->2k+1 until a semiprime is reached; sequence gives the semiprimes.
%C This is to semiprimes A001358 as A051919 is to primes A000040. Is this sequence defined for all n?
%e a(0) = 15 in 4 steps because 2*(2*(2*((2*0)+1)+1)+1)+1 = 15 = 3*5 is semiprime.
%e a(1) = 15 in 3 steps because 2*(2*((2*1) + 1)+1)+1 = 15 = 3*5
%e a(2) = 95 in 5 steps because 2*(2*(2*(2*(2*2 + 1)+1)+1)+1)+1 = 95 = 5*19.
%t semiPrimeQ[n_] := Total[FactorInteger[n]][[2]]==2; Table[k = n; While[k = 2 k + 1; ! semiPrimeQ[k]]; k, {n, 100}] (* _T. D. Noe_, Apr 29 2011 *)
%Y Cf. A001358, A051919.
%K nonn,easy
%O 0,1
%A _Jonathan Vos Post_, Apr 25 2011
%E Extended by _T. D. Noe_, Apr 29 2011
|