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.

A338471 Products of three prime numbers of odd index.

This page as a plain text file.
%I A338471 #26 Jun 11 2025 14:32:17
%S A338471 8,20,44,50,68,92,110,124,125,164,170,188,230,236,242,268,275,292,310,
%T A338471 332,374,388,410,412,425,436,470,506,508,548,575,578,590,596,605,628,
%U A338471 668,670,682,716,730,764,775,782,788,830,844,902,908,932,935,964,970
%N A338471 Products of three prime numbers of odd index.
%C A338471 Also Heinz numbers of integer partitions with 3 parts, all of which are odd. These partitions are counted by A001399.
%H A338471 Robert Israel, <a href="/A338471/b338471.txt">Table of n, a(n) for n = 1..10000</a>
%e A338471 The sequence of terms together with their prime indices begins:
%e A338471        8: {1,1,1}      268: {1,1,19}     575: {3,3,9}
%e A338471       20: {1,1,3}      275: {3,3,5}      578: {1,7,7}
%e A338471       44: {1,1,5}      292: {1,1,21}     590: {1,3,17}
%e A338471       50: {1,3,3}      310: {1,3,11}     596: {1,1,35}
%e A338471       68: {1,1,7}      332: {1,1,23}     605: {3,5,5}
%e A338471       92: {1,1,9}      374: {1,5,7}      628: {1,1,37}
%e A338471      110: {1,3,5}      388: {1,1,25}     668: {1,1,39}
%e A338471      124: {1,1,11}     410: {1,3,13}     670: {1,3,19}
%e A338471      125: {3,3,3}      412: {1,1,27}     682: {1,5,11}
%e A338471      164: {1,1,13}     425: {3,3,7}      716: {1,1,41}
%e A338471      170: {1,3,7}      436: {1,1,29}     730: {1,3,21}
%e A338471      188: {1,1,15}     470: {1,3,15}     764: {1,1,43}
%e A338471      230: {1,3,9}      506: {1,5,9}      775: {3,3,11}
%e A338471      236: {1,1,17}     508: {1,1,31}     782: {1,7,9}
%e A338471      242: {1,5,5}      548: {1,1,33}     788: {1,1,45}
%p A338471 N:= 1000: # for terms <= N
%p A338471 R:= NULL:
%p A338471 for i from 1 by 2 do
%p A338471   p:= ithprime(i);
%p A338471   if p^3 >= N then break fi;
%p A338471   for j from i by 2 do
%p A338471     q:= ithprime(j);
%p A338471     if p*q^2 >= N then break fi;
%p A338471     for k from j by 2 do
%p A338471       x:= p*q*ithprime(k);
%p A338471       if x > N then break fi;
%p A338471       R:= R,x;
%p A338471 od od od:
%p A338471 sort([R]); # _Robert Israel_, Jun 11 2025
%t A338471 Select[Range[100],PrimeOmega[#]==3&&OddQ[Times@@PrimePi/@First/@FactorInteger[#]]&]
%o A338471 (PARI) isok(m) = my(f=factor(m)); (bigomega(f)==3) && (#select(x->!(x%2), apply(primepi, f[,1]~)) == 0); \\ _Michel Marcus_, Nov 10 2020
%o A338471 (Python)
%o A338471 from sympy import primerange
%o A338471 from itertools import combinations_with_replacement as mc
%o A338471 def aupto(limit):
%o A338471     pois = [p for i, p in enumerate(primerange(2, limit//4+1)) if i%2 == 0]
%o A338471     return sorted(set(a*b*c for a, b, c in mc(pois, 3) if a*b*c <= limit))
%o A338471 print(aupto(971)) # _Michael S. Branicky_, Aug 20 2021
%o A338471 (Python)
%o A338471 from math import isqrt
%o A338471 from sympy import primepi, primerange, integer_nthroot
%o A338471 def A338471(n):
%o A338471     def bisection(f,kmin=0,kmax=1):
%o A338471         while f(kmax) > kmax: kmax <<= 1
%o A338471         while kmax-kmin > 1:
%o A338471             kmid = kmax+kmin>>1
%o A338471             if f(kmid) <= kmid:
%o A338471                 kmax = kmid
%o A338471             else:
%o A338471                 kmin = kmid
%o A338471         return kmax
%o A338471     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))))
%o A338471     return bisection(f,n,n) # _Chai Wah Wu_, Oct 18 2024
%Y A338471 A066208 allows products of any length (strict: A258116).
%Y A338471 A307534 is the squarefree case.
%Y A338471 A338469 is the restriction to odds.
%Y A338471 A338556 is the version for evens (strict: A338557).
%Y A338471 A000009 counts partitions into odd parts (strict: A000700).
%Y A338471 A001399(n-3) counts 3-part partitions (strict: A001399(n-6)).
%Y A338471 A008284 counts partitions by sum and length.
%Y A338471 A014311 is a ranking of ordered triples (strict: A337453).
%Y A338471 A014612 lists Heinz numbers of all triples (strict: A007304).
%Y A338471 A023023 counts 3-part relatively prime partitions (strict: A101271).
%Y A338471 A023023 counts 3-part relatively prime partitions (strict: A078374).
%Y A338471 A046316 lists products of exactly three odd primes (strict: A046389).
%Y A338471 A066207 lists numbers with all even prime indices (strict: A258117).
%Y A338471 A075818 lists even Heinz numbers of 3-part partitions (strict: A075819).
%Y A338471 A285508 lists Heinz numbers of non-strict triples.
%Y A338471 A307719 counts 3-part pairwise coprime partitions (strict: A220377).
%Y A338471 Cf. A000217, A001221, A001222, A005117, A037144, A056239, A112798.
%Y A338471 Subsequence of A332820.
%K A338471 nonn
%O A338471 1,1
%A A338471 _Gus Wiseman_, Nov 08 2020