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.

A289182 Positions of odd semiprimes in A001358.

This page as a plain text file.
%I A289182 #12 Apr 03 2025 14:14:36
%S A289182 3,6,7,9,11,13,15,17,18,19,20,23,24,26,28,30,31,32,34,36,37,39,40,42,
%T A289182 43,44,46,48,49,51,53,54,56,57,59,60,61,63,65,66,68,69,71,72,74,75,77,
%U A289182 78,79,80,81,83,85,86,89,90,91,92,94,95,97,98
%N A289182 Positions of odd semiprimes in A001358.
%C A289182 Complement to A115392.
%F A289182 a(n) ~ n. - _Charles R Greathouse IV_, Jul 02 2017
%t A289182 sp=Select[Range[4,1000],2==PrimeOmega[#]&];Flatten[Position[Mod[sp, 2],1]]
%o A289182 (PARI) lista(nn) = vsp = select(x->(bigomega(x)==2), vector(nn, k, k)); select(x->(x%2), vsp, 1); \\ _Michel Marcus_, Jul 02 2017
%o A289182 (Python)
%o A289182 from math import isqrt
%o A289182 from sympy import primepi, primerange
%o A289182 def A289182(n):
%o A289182     def iterfun(f,n=0):
%o A289182         m, k = n, f(n)
%o A289182         while m != k: m, k = k, f(k)
%o A289182         return m
%o A289182     def f(x): return int(-((t:=primepi(s:=isqrt(x)))*(t-1)>>1)+sum(primepi(x//p) for p in primerange(3,s+1)))
%o A289182     return f(m:=iterfun(lambda x:int(n+x-f(x)),n))+primepi(m>>1) # _Chai Wah Wu_, Apr 03 2025
%Y A289182 Cf. A001358, A115392.
%K A289182 nonn
%O A289182 1,1
%A A289182 _Zak Seidov_, Jun 27 2017