login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A234099
Integers of the form (p*q*r - 1)/2, where p, q, r are distinct primes.
6
52, 82, 97, 115, 127, 136, 142, 172, 178, 192, 199, 214, 217, 227, 232, 241, 277, 280, 297, 304, 307, 313, 322, 325, 331, 332, 352, 357, 370, 379, 388, 397, 402, 430, 442, 448, 451, 457, 467, 478, 484, 493, 500, 502, 507, 511, 522, 532, 542, 547, 552, 556
OFFSET
1,1
FORMULA
-1 + A234102.
a(n) = (A046389(n)-1)/2. - Chai Wah Wu, Oct 18 2024
EXAMPLE
52 = (3*5*7 - 1)/2.
MATHEMATICA
t = Select[Range[1, 10000, 2], Map[Last, FactorInteger[#]] == Table[1, {3}] &]; Take[(t - 1)/2, 120] (* A234099 *)
v = Flatten[Position[PrimeQ[(t - 1)/2], True]] ; w = Table[t[[v[[n]]]], {n, 1, Length[v]}] (* A234100 *)
(w - 1)/2 (* A234101 *) (* Peter J. C. Moses, Dec 23 2013 *)
PROG
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
def A234099(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
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)))
return bisection(f, n, n)>>1 # Chai Wah Wu, Oct 18 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Dec 27 2013
STATUS
approved