login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A234102
Integers of the form (p*q*r + 1)/2, where p, q, r are distinct primes.
7
53, 83, 98, 116, 128, 137, 143, 173, 179, 193, 200, 215, 218, 228, 233, 242, 278, 281, 298, 305, 308, 314, 323, 326, 332, 333, 353, 358, 371, 380, 389, 398, 403, 431, 443, 449, 452, 458, 468, 479, 485, 494, 501, 503, 508, 512, 523, 533, 543, 548, 553, 557
OFFSET
1,1
FORMULA
1 + A234099.
a(n) = (A046389(n)+1)/2. - Chai Wah Wu, Oct 18 2024
EXAMPLE
53 = (3*5*7 + 1)/2.
MATHEMATICA
t = Select[Range[1, 10000, 2], Map[Last, FactorInteger[#]] == Table[1, {3}] &]; Take[(t + 1)/2, 120] (* A234102 *)
v = Flatten[Position[PrimeQ[(t + 1)/2], True]] ; w = Table[t[[v[[n]]]], {n, 1, Length[v]}] (* A234103 *)
(w + 1)/2 (* A234104 *) (* Peter J. C. Moses, Dec 23 2013 *)
PROG
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
def A234102(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>>1 # Chai Wah Wu, Oct 18 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Dec 27 2013
STATUS
approved

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy