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.

Showing 1-2 of 2 results.

A046316 Numbers of the form p*q*r where p,q,r are (not necessarily distinct) odd primes.

Original entry on oeis.org

27, 45, 63, 75, 99, 105, 117, 125, 147, 153, 165, 171, 175, 195, 207, 231, 245, 255, 261, 273, 275, 279, 285, 325, 333, 343, 345, 357, 363, 369, 385, 387, 399, 423, 425, 429, 435, 455, 465, 475, 477, 483, 507, 531, 539, 549, 555, 561, 575, 595, 603, 605
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

A369979 sorted into ascending order.
Subsequence of A014612 and of A046340.
Cf. A255646 (final digits), A369054, A369058 (characteristic function), A369252 [= A003415(a(n))].

Programs

  • Haskell
    a046316 n = a046316_list !! (n-1)
    a046316_list = filter ((== 3) . a001222) [1, 3 ..]
    -- Reinhard Zumkeller, May 05 2015
    
  • PARI
    list(lim)=my(v=List(),pq); forprime(p=3,lim\9, forprime(q=3,min(lim\3\p,p), pq=p*q; forprime(r=3,lim\pq, listput(v, pq*r)))); Set(v) \\ Charles R Greathouse IV, Aug 23 2017
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A046316(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+1 for a,k in enumerate(primerange(3,integer_nthroot(x,3)[0]+1),2) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
        return bisection(f,n,n) # Chai Wah Wu, Oct 18 2024

Extensions

Definition clarified by N. J. A. Sloane, Dec 19 2017

A338471 Products of three prime numbers of odd index.

Original entry on oeis.org

8, 20, 44, 50, 68, 92, 110, 124, 125, 164, 170, 188, 230, 236, 242, 268, 275, 292, 310, 332, 374, 388, 410, 412, 425, 436, 470, 506, 508, 548, 575, 578, 590, 596, 605, 628, 668, 670, 682, 716, 730, 764, 775, 782, 788, 830, 844, 902, 908, 932, 935, 964, 970
Offset: 1

Views

Author

Gus Wiseman, Nov 08 2020

Keywords

Comments

Also Heinz numbers of integer partitions with 3 parts, all of which are odd. These partitions are counted by A001399.

Examples

			The sequence of terms together with their prime indices begins:
       8: {1,1,1}      268: {1,1,19}     575: {3,3,9}
      20: {1,1,3}      275: {3,3,5}      578: {1,7,7}
      44: {1,1,5}      292: {1,1,21}     590: {1,3,17}
      50: {1,3,3}      310: {1,3,11}     596: {1,1,35}
      68: {1,1,7}      332: {1,1,23}     605: {3,5,5}
      92: {1,1,9}      374: {1,5,7}      628: {1,1,37}
     110: {1,3,5}      388: {1,1,25}     668: {1,1,39}
     124: {1,1,11}     410: {1,3,13}     670: {1,3,19}
     125: {3,3,3}      412: {1,1,27}     682: {1,5,11}
     164: {1,1,13}     425: {3,3,7}      716: {1,1,41}
     170: {1,3,7}      436: {1,1,29}     730: {1,3,21}
     188: {1,1,15}     470: {1,3,15}     764: {1,1,43}
     230: {1,3,9}      506: {1,5,9}      775: {3,3,11}
     236: {1,1,17}     508: {1,1,31}     782: {1,7,9}
     242: {1,5,5}      548: {1,1,33}     788: {1,1,45}
		

Crossrefs

A066208 allows products of any length (strict: A258116).
A307534 is the squarefree case.
A338469 is the restriction to odds.
A338556 is the version for evens (strict: A338557).
A000009 counts partitions into odd parts (strict: A000700).
A001399(n-3) counts 3-part partitions (strict: A001399(n-6)).
A008284 counts partitions by sum and length.
A014311 is a ranking of ordered triples (strict: A337453).
A014612 lists Heinz numbers of all triples (strict: A007304).
A023023 counts 3-part relatively prime partitions (strict: A101271).
A023023 counts 3-part relatively prime partitions (strict: A078374).
A046316 lists products of exactly three odd primes (strict: A046389).
A066207 lists numbers with all even prime indices (strict: A258117).
A075818 lists even Heinz numbers of 3-part partitions (strict: A075819).
A285508 lists Heinz numbers of non-strict triples.
A307719 counts 3-part pairwise coprime partitions (strict: A220377).
Subsequence of A332820.

Programs

  • Maple
    N:= 1000: # for terms <= N
    R:= NULL:
    for i from 1 by 2 do
      p:= ithprime(i);
      if p^3 >= N then break fi;
      for j from i by 2 do
        q:= ithprime(j);
        if p*q^2 >= N then break fi;
        for k from j by 2 do
          x:= p*q*ithprime(k);
          if x > N then break fi;
          R:= R,x;
    od od od:
    sort([R]); # Robert Israel, Jun 11 2025
  • Mathematica
    Select[Range[100],PrimeOmega[#]==3&&OddQ[Times@@PrimePi/@First/@FactorInteger[#]]&]
  • PARI
    isok(m) = my(f=factor(m)); (bigomega(f)==3) && (#select(x->!(x%2), apply(primepi, f[,1]~)) == 0); \\ Michel Marcus, Nov 10 2020
    
  • Python
    from sympy import primerange
    from itertools import combinations_with_replacement as mc
    def aupto(limit):
        pois = [p for i, p in enumerate(primerange(2, limit//4+1)) if i%2 == 0]
        return sorted(set(a*b*c for a, b, c in mc(pois, 3) if a*b*c <= limit))
    print(aupto(971)) # Michael S. Branicky, Aug 20 2021
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A338471(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))+1>>1)-(b+1>>1)+1 for a,k in filter(lambda x:x[0]&1,enumerate(primerange(integer_nthroot(x,3)[0]+1),1)) for b,m in filter(lambda x:x[0]&1,enumerate(primerange(k,isqrt(x//k)+1),a))))
        return bisection(f,n,n) # Chai Wah Wu, Oct 18 2024
Showing 1-2 of 2 results.