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.
%I A338906 #18 Apr 22 2025 05:08:56 %S A338906 4,9,10,21,22,25,34,39,46,49,55,57,62,82,85,87,91,94,111,115,118,121, %T A338906 129,133,134,146,155,159,166,169,183,187,194,203,205,206,213,218,235, %U A338906 237,247,253,254,259,267,274,289,295,298,301,303,314,321,334,335,339 %N A338906 Semiprimes whose prime indices sum to an even number. %C A338906 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. %F A338906 A338906 \/ A338907 = A001358. %e A338906 The sequence of terms together with their prime indices begins: %e A338906 4: {1,1} 87: {2,10} 183: {2,18} 274: {1,33} %e A338906 9: {2,2} 91: {4,6} 187: {5,7} 289: {7,7} %e A338906 10: {1,3} 94: {1,15} 194: {1,25} 295: {3,17} %e A338906 21: {2,4} 111: {2,12} 203: {4,10} 298: {1,35} %e A338906 22: {1,5} 115: {3,9} 205: {3,13} 301: {4,14} %e A338906 25: {3,3} 118: {1,17} 206: {1,27} 303: {2,26} %e A338906 34: {1,7} 121: {5,5} 213: {2,20} 314: {1,37} %e A338906 39: {2,6} 129: {2,14} 218: {1,29} 321: {2,28} %e A338906 46: {1,9} 133: {4,8} 235: {3,15} 334: {1,39} %e A338906 49: {4,4} 134: {1,19} 237: {2,22} 335: {3,19} %e A338906 55: {3,5} 146: {1,21} 247: {6,8} 339: {2,30} %e A338906 57: {2,8} 155: {3,11} 253: {5,9} 341: {5,11} %e A338906 62: {1,11} 159: {2,16} 254: {1,31} 358: {1,41} %e A338906 82: {1,13} 166: {1,23} 259: {4,12} 361: {8,8} %e A338906 85: {3,7} 169: {6,6} 267: {2,24} 365: {3,21} %t A338906 primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; %t A338906 Select[Range[100],PrimeOmega[#]==2&&EvenQ[Total[primeMS[#]]]&] %o A338906 (Python) %o A338906 from math import isqrt %o A338906 from sympy import primepi, primerange %o A338906 def A338906(n): %o A338906 def bisection(f,kmin=0,kmax=1): %o A338906 while f(kmax) > kmax: kmax <<= 1 %o A338906 kmin = kmax >> 1 %o A338906 while kmax-kmin > 1: %o A338906 kmid = kmax+kmin>>1 %o A338906 if f(kmid) <= kmid: %o A338906 kmax = kmid %o A338906 else: %o A338906 kmin = kmid %o A338906 return kmax %o A338906 def f(x): return n+x-sum((primepi(x//p)-a>>1) for a,p in enumerate(primerange(isqrt(x)+1),-1)) %o A338906 return bisection(f,n,n) # _Chai Wah Wu_, Apr 03 2025 %Y A338906 A031215 looks at primes instead of semiprimes. %Y A338906 A098350 has this as union of even-indexed antidiagonals. %Y A338906 A300061 looks at all numbers (not just semiprimes). %Y A338906 A338904 has this as union of even-indexed rows. %Y A338906 A338907 is the odd version. %Y A338906 A338908 is the squarefree case. %Y A338906 A001358 lists semiprimes, with odd/even terms A046315/A100484. %Y A338906 A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484. %Y A338906 A056239 gives the sum of prime indices (Heinz weight). %Y A338906 A084126 and A084127 give the prime factors of semiprimes. %Y A338906 A087112 groups semiprimes by greater factor. %Y A338906 A289182/A115392 list the positions of odd/even terms in A001358. %Y A338906 A338898, A338912, and A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506. %Y A338906 A338899, A270650, and A270652 give the prime indices of squarefree semiprimes, with difference A338900. %Y A338906 A338911 lists products of pairs of primes both of even index. %Y A338906 A339114/A339115 give the least/greatest semiprime of weight n. %Y A338906 Cf. A000040, A001222, A024697, A037143, A112798, A300063, A319242, A320655, A332765, A338910, A339004. %K A338906 nonn %O A338906 1,1 %A A338906 _Gus Wiseman_, Nov 28 2020