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.

A234102 Integers of the form (p*q*r + 1)/2, where p, q, r are distinct primes.

This page as a plain text file.
%I A234102 #10 Oct 18 2024 11:42:57
%S A234102 53,83,98,116,128,137,143,173,179,193,200,215,218,228,233,242,278,281,
%T A234102 298,305,308,314,323,326,332,333,353,358,371,380,389,398,403,431,443,
%U A234102 449,452,458,468,479,485,494,501,503,508,512,523,533,543,548,553,557
%N A234102 Integers of the form (p*q*r + 1)/2, where p, q, r are distinct primes.
%F A234102 1 + A234099.
%F A234102 a(n) = (A046389(n)+1)/2. - _Chai Wah Wu_, Oct 18 2024
%e A234102 53 = (3*5*7 + 1)/2.
%t A234102 t = Select[Range[1, 10000, 2], Map[Last, FactorInteger[#]] == Table[1, {3}] &]; Take[(t + 1)/2, 120] (* A234102 *)
%t A234102 v = Flatten[Position[PrimeQ[(t + 1)/2], True]] ; w = Table[t[[v[[n]]]], {n, 1, Length[v]}]  (* A234103 *)
%t A234102 (w + 1)/2  (* A234104 *)    (* _Peter J. C. Moses_, Dec 23 2013 *)
%o A234102 (Python)
%o A234102 from math import isqrt
%o A234102 from sympy import primepi, primerange, integer_nthroot
%o A234102 def A234102(n):
%o A234102     def bisection(f,kmin=0,kmax=1):
%o A234102         while f(kmax) > kmax: kmax <<= 1
%o A234102         while kmax-kmin > 1:
%o A234102             kmid = kmax+kmin>>1
%o A234102             if f(kmid) <= kmid:
%o A234102                 kmax = kmid
%o A234102             else:
%o A234102                 kmin = kmid
%o A234102         return kmax
%o A234102     def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(3,integer_nthroot(x,3)[0]+1),2) for b,m in enumerate(primerange(k+1,isqrt(x//k)+1),a+1)))
%o A234102     return bisection(f,n,n)+1>>1 # _Chai Wah Wu_, Oct 18 2024
%Y A234102 Cf. A046389, A234099, A234103, A234104.
%K A234102 nonn,easy
%O A234102 1,1
%A A234102 _Clark Kimberling_, Dec 27 2013