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.

A346041 Numbers with exactly 1 semiprime divisor.

This page as a plain text file.
%I A346041 #15 Jun 21 2024 17:08:32
%S A346041 4,6,8,9,10,14,15,16,21,22,25,26,27,32,33,34,35,38,39,46,49,51,55,57,
%T A346041 58,62,64,65,69,74,77,81,82,85,86,87,91,93,94,95,106,111,115,118,119,
%U A346041 121,122,123,125,128,129,133,134,141,142,143,145,146,155,158,159,161,166,169
%N A346041 Numbers with exactly 1 semiprime divisor.
%C A346041 Numbers of the form p*q or p^k, where p and q are prime and k >= 2.
%C A346041 Numbers k such that A086971(k) = 1. - _Wesley Ivan Hurt_, Jun 21 2024
%e A346041 6 is in the sequence since it has exactly 1 semiprime divisor, namely 6.
%e A346041 16 is in the sequence since it has exactly 1 semiprime divisor, namely 4.
%t A346041 Select[Range@200,Length@Select[Divisors@#,PrimeOmega@#==2&]==1&] (* _Giorgos Kalogeropoulos_, Jul 03 2021 *)
%o A346041 (PARI) isok(k) = sumdiv(k, d, bigomega(d)==2) == 1; \\ _Michel Marcus_, Jul 03 2021
%o A346041 (Python)
%o A346041 from sympy import factorint
%o A346041 def ok(n):
%o A346041     f = factorint(n); w = len(f); W = sum(f.values())
%o A346041     return (w == 1 and W >= 2) or (w == 2 and W == 2)
%o A346041 print(list(filter(ok, range(170)))) # _Michael S. Branicky_, Jul 03 2021
%Y A346041 Cf. A001358 (semiprimes), A086971.
%K A346041 nonn
%O A346041 1,1
%A A346041 _Wesley Ivan Hurt_, Jul 02 2021