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.

A185008 Next semiprime after 10*n.

Original entry on oeis.org

4, 14, 21, 33, 46, 51, 62, 74, 82, 91, 106, 111, 121, 133, 141, 155, 161, 177, 183, 194, 201, 213, 221, 235, 247, 253, 262, 274, 287, 291, 301, 314, 321, 334, 341, 355, 361, 371, 381, 391, 403, 411, 422, 437, 445, 451, 466, 471, 481, 493, 501, 511, 526, 533
Offset: 0

Views

Author

Jonathan Vos Post, Nov 01 2012

Keywords

Comments

This is to semiprimes A001358 as A218255 is to primes A000040.

Examples

			a(0) = 4 because 4=2^2 is the least semiprime > 10*0=0.
a(1) = 14 because 14=2*7 is the least semiprime > 10*1=10.
		

Crossrefs

Programs

  • Mathematica
    SemiprimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; NextSemiprime[n_] := Module[{m = n + 1}, While[! SemiPrimeQ[m], m++]; m]; Table[NextSemiprime[10*n], {n, 0, 100}] (* T. D. Noe, Nov 02 2012 *)
    nsp[n_]:=Module[{k=n+1},While[PrimeOmega[k]!=2,k++];k]; Table[nsp[10n],{n,0,60}] (* Harvey P. Dale, Mar 17 2023 *)
  • Python
    from sympy import primeomega
    def nextsemiprime(n):
      while primeomega(n + 1) != 2: n += 1
      return n + 1
    def a(n): return nextsemiprime(10*n)
    print([a(n) for n in range(54)]) # Michael S. Branicky, Apr 14 2021

Formula

a(n) = MIN[k in A218255 and k > 10*n].