login
Products of three prime numbers of even index.
7

%I #20 Oct 18 2024 18:07:42

%S 27,63,117,147,171,261,273,333,343,387,399,477,507,549,609,637,639,

%T 711,741,777,801,903,909,931,963,1017,1083,1113,1131,1179,1183,1251,

%U 1281,1359,1421,1443,1467,1491,1557,1629,1653,1659,1677,1729,1737,1791,1813,1869

%N Products of three prime numbers of even index.

%C All terms are odd.

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

%e The sequence of terms together with their prime indices begins:

%e 27: {2,2,2} 637: {4,4,6} 1183: {4,6,6}

%e 63: {2,2,4} 639: {2,2,20} 1251: {2,2,34}

%e 117: {2,2,6} 711: {2,2,22} 1281: {2,4,18}

%e 147: {2,4,4} 741: {2,6,8} 1359: {2,2,36}

%e 171: {2,2,8} 777: {2,4,12} 1421: {4,4,10}

%e 261: {2,2,10} 801: {2,2,24} 1443: {2,6,12}

%e 273: {2,4,6} 903: {2,4,14} 1467: {2,2,38}

%e 333: {2,2,12} 909: {2,2,26} 1491: {2,4,20}

%e 343: {4,4,4} 931: {4,4,8} 1557: {2,2,40}

%e 387: {2,2,14} 963: {2,2,28} 1629: {2,2,42}

%e 399: {2,4,8} 1017: {2,2,30} 1653: {2,8,10}

%e 477: {2,2,16} 1083: {2,8,8} 1659: {2,4,22}

%e 507: {2,6,6} 1113: {2,4,16} 1677: {2,6,14}

%e 549: {2,2,18} 1131: {2,6,10} 1729: {4,6,8}

%e 609: {2,4,10} 1179: {2,2,32} 1737: {2,2,44}

%t Select[Range[1000],PrimeOmega[#]==3&&OddQ[Times@@(1+PrimePi/@First/@FactorInteger[#])]&]

%o (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 (Python)

%o from itertools import filterfalse

%o from math import isqrt

%o from sympy import primepi, primerange, integer_nthroot

%o def A338556(n):

%o def bisection(f,kmin=0,kmax=1):

%o while f(kmax) > kmax: kmax <<= 1

%o while kmax-kmin > 1:

%o kmid = kmax+kmin>>1

%o if f(kmid) <= kmid:

%o kmax = kmid

%o else:

%o kmin = kmid

%o return kmax

%o def f(x): return int(n+x-sum((primepi(x//(k*m))>>1)-(b>>1)+1 for a,k in filterfalse(lambda x:x[0]&1,enumerate(primerange(3,integer_nthroot(x,3)[0]+1),2)) for b,m in filterfalse(lambda x:x[0]&1,enumerate(primerange(k,isqrt(x//k)+1),a))))

%o return bisection(f,n,n) # _Chai Wah Wu_, Oct 18 2024

%Y A014612 allows all prime indices (not just even) (strict: A007304).

%Y A066207 allows products of any length (strict: A258117).

%Y A338471 is the version for odds instead of evens (strict: A307534).

%Y A338557 is the strict case.

%Y A014311 is a ranking of ordered triples (strict: A337453).

%Y A001399(n-3) counts 3-part partitions (strict: A001399(n-6)).

%Y A005117 lists squarefree numbers, with even case A039956.

%Y A008284 counts partitions by sum and length (strict: A008289).

%Y A023023 counts 3-part relatively prime partitions (strict: A101271).

%Y A046316 lists products of exactly three odd primes (strict: A046389).

%Y A066208 lists numbers with all odd prime indices (strict: A258116).

%Y A075818 lists even Heinz numbers of 3-part partitions (strict: A075819).

%Y A307719 counts 3-part pairwise coprime partitions (strict: A220377).

%Y A285508 lists Heinz numbers of non-strict triples.

%Y Cf. A000217, A001221, A001222, A037144, A056239, A112798, A337599, A337600.

%Y Subsequence of A332820.

%K nonn

%O 1,1

%A _Gus Wiseman_, Nov 08 2020