OFFSET
0,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = MIN[k in A218255 and k > 10*n].
EXAMPLE
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.
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 *)
PROG
(Python)
from sympy.ntheory.factor_ 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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Nov 01 2012
STATUS
approved