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.

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

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Dec 27 2013

Keywords

Examples

			52 = (3*5*7 - 1)/2.
		

Crossrefs

Programs

  • 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 *)
  • 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

Formula

-1 + A234102.
a(n) = (A046389(n)-1)/2. - Chai Wah Wu, Oct 18 2024