login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A185008 Next semiprime after 10*n. 3

%I #17 Mar 17 2023 11:25:16

%S 4,14,21,33,46,51,62,74,82,91,106,111,121,133,141,155,161,177,183,194,

%T 201,213,221,235,247,253,262,274,287,291,301,314,321,334,341,355,361,

%U 371,381,391,403,411,422,437,445,451,466,471,481,493,501,511,526,533

%N Next semiprime after 10*n.

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

%H Harvey P. Dale, <a href="/A185008/b185008.txt">Table of n, a(n) for n = 0..1000</a>

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

%e a(0) = 4 because 4=2^2 is the least semiprime > 10*0=0.

%e a(1) = 14 because 14=2*7 is the least semiprime > 10*1=10.

%t 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 *)

%t nsp[n_]:=Module[{k=n+1},While[PrimeOmega[k]!=2,k++];k]; Table[nsp[10n],{n,0,60}] (* _Harvey P. Dale_, Mar 17 2023 *)

%o (Python)

%o from sympy.ntheory.factor_ import primeomega

%o def nextsemiprime(n):

%o while primeomega(n + 1) != 2: n += 1

%o return n + 1

%o def a(n): return nextsemiprime(10*n)

%o print([a(n) for n in range(54)]) # _Michael S. Branicky_, Apr 14 2021

%Y Cf. A001358, A218255.

%K nonn,easy

%O 0,1

%A _Jonathan Vos Post_, Nov 01 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)