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.

A338907 Semiprimes whose prime indices sum to an odd number.

This page as a plain text file.
%I A338907 #25 Apr 22 2025 05:09:01
%S A338907 6,14,15,26,33,35,38,51,58,65,69,74,77,86,93,95,106,119,122,123,141,
%T A338907 142,143,145,158,161,177,178,185,201,202,209,214,215,217,219,221,226,
%U A338907 249,262,265,278,287,291,299,302,305,309,319,323,326,327,329,346,355
%N A338907 Semiprimes whose prime indices sum to an odd number.
%C A338907 All terms are squarefree (A005117).
%C A338907 A semiprime is a product of any two prime numbers. A prime index of n is a number m such that the m-th prime number divides n. The multiset of prime indices of n is row n of A112798.
%C A338907 The semiprimes in A300063; the semiprimes in A332820. - _Peter Munn_, Dec 25 2020
%F A338907 Complement of A338906 in A001358.
%e A338907 The sequence of terms together with their prime indices begins:
%e A338907       6: {1,2}      95: {3,8}     202: {1,26}
%e A338907      14: {1,4}     106: {1,16}    209: {5,8}
%e A338907      15: {2,3}     119: {4,7}     214: {1,28}
%e A338907      26: {1,6}     122: {1,18}    215: {3,14}
%e A338907      33: {2,5}     123: {2,13}    217: {4,11}
%e A338907      35: {3,4}     141: {2,15}    219: {2,21}
%e A338907      38: {1,8}     142: {1,20}    221: {6,7}
%e A338907      51: {2,7}     143: {5,6}     226: {1,30}
%e A338907      58: {1,10}    145: {3,10}    249: {2,23}
%e A338907      65: {3,6}     158: {1,22}    262: {1,32}
%e A338907      69: {2,9}     161: {4,9}     265: {3,16}
%e A338907      74: {1,12}    177: {2,17}    278: {1,34}
%e A338907      77: {4,5}     178: {1,24}    287: {4,13}
%e A338907      86: {1,14}    185: {3,12}    291: {2,25}
%e A338907      93: {2,11}    201: {2,19}    299: {6,9}
%t A338907 primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
%t A338907 Select[Range[100],PrimeOmega[#]==2&&OddQ[Total[primeMS[#]]]&]
%o A338907 (Python)
%o A338907 from math import isqrt
%o A338907 from sympy import primepi, primerange
%o A338907 def A338907(n):
%o A338907     def bisection(f,kmin=0,kmax=1):
%o A338907         while f(kmax) > kmax: kmax <<= 1
%o A338907         kmin = kmax >> 1
%o A338907         while kmax-kmin > 1:
%o A338907             kmid = kmax+kmin>>1
%o A338907             if f(kmid) <= kmid:
%o A338907                 kmax = kmid
%o A338907             else:
%o A338907                 kmin = kmid
%o A338907         return kmax
%o A338907     def f(x): return n+x-sum((primepi(x//p)-a>>1) for a,p in enumerate(primerange(isqrt(x)+1)))
%o A338907     return bisection(f,n,n) # _Chai Wah Wu_, Apr 03 2025
%Y A338907 A031368 looks at primes instead of semiprimes.
%Y A338907 A098350 has this as union of odd-indexed antidiagonals.
%Y A338907 A300063 looks at all numbers (not just semiprimes).
%Y A338907 A338904 has this as union of odd-indexed rows.
%Y A338907 A338906 is the even version.
%Y A338907 A001358 lists semiprimes, with odd/even terms A046315/A100484.
%Y A338907 A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
%Y A338907 A056239 gives the sum of prime indices (Heinz weight).
%Y A338907 A084126 and A084127 give the prime factors of semiprimes.
%Y A338907 A087112 groups semiprimes by greater factor.
%Y A338907 A289182/A115392 list the positions of odd/even terms in A001358.
%Y A338907 A338898, A338912, and A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.
%Y A338907 A338899, A270650, and A270652 give the prime indices of squarefree semiprimes, with difference A338900.
%Y A338907 A338908 lists squarefree semiprimes of even weight.
%Y A338907 A339114/A339115 give the least/greatest semiprime of weight n.
%Y A338907 Cf. A000040, A001222, A014342, A024697, A062198, A112798, A300061, A319242, A320655, A338910, A339003.
%Y A338907 Subsequence of A332820.
%K A338907 nonn
%O A338907 1,1
%A A338907 _Gus Wiseman_, Nov 28 2020