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.

A189657 Start with n, apply k->2k+1 until a semiprime is reached; sequence gives the semiprimes.

Original entry on oeis.org

15, 95, 15, 9, 95, 55, 15, 35, 39, 21, 95, 25, 55, 119, 511, 33, 35, 303, 39, 335, 87, 91, 95, 49, 51, 215, 55, 57, 119, 123, 511, 65, 543, 69, 143, 295, 303, 77, 159, 327, 335, 85, 87, 5759, 91, 93, 95, 391, 799, 203, 415, 54271, 215, 219, 111, 3647, 115
Offset: 0

Views

Author

Jonathan Vos Post, Apr 25 2011

Keywords

Comments

This is to semiprimes A001358 as A051919 is to primes A000040. Is this sequence defined for all n?

Examples

			a(0) = 15 in 4 steps because 2*(2*(2*((2*0)+1)+1)+1)+1 = 15 = 3*5 is semiprime.
a(1) = 15 in 3 steps because 2*(2*((2*1) + 1)+1)+1 = 15 = 3*5
a(2) = 95 in 5 steps because 2*(2*(2*(2*(2*2 + 1)+1)+1)+1)+1 = 95 = 5*19.
		

Crossrefs

Programs

  • Mathematica
    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 *)

Extensions

Extended by T. D. Noe, Apr 29 2011