OFFSET
1,1
COMMENTS
All terms are odd.
Also Heinz numbers of integer partitions with 3 parts, all of which are even. These partitions are counted by A001399.
EXAMPLE
The sequence of terms together with their prime indices begins:
27: {2,2,2} 637: {4,4,6} 1183: {4,6,6}
63: {2,2,4} 639: {2,2,20} 1251: {2,2,34}
117: {2,2,6} 711: {2,2,22} 1281: {2,4,18}
147: {2,4,4} 741: {2,6,8} 1359: {2,2,36}
171: {2,2,8} 777: {2,4,12} 1421: {4,4,10}
261: {2,2,10} 801: {2,2,24} 1443: {2,6,12}
273: {2,4,6} 903: {2,4,14} 1467: {2,2,38}
333: {2,2,12} 909: {2,2,26} 1491: {2,4,20}
343: {4,4,4} 931: {4,4,8} 1557: {2,2,40}
387: {2,2,14} 963: {2,2,28} 1629: {2,2,42}
399: {2,4,8} 1017: {2,2,30} 1653: {2,8,10}
477: {2,2,16} 1083: {2,8,8} 1659: {2,4,22}
507: {2,6,6} 1113: {2,4,16} 1677: {2,6,14}
549: {2,2,18} 1131: {2,6,10} 1729: {4,6,8}
609: {2,4,10} 1179: {2,2,32} 1737: {2,2,44}
MATHEMATICA
Select[Range[1000], PrimeOmega[#]==3&&OddQ[Times@@(1+PrimePi/@First/@FactorInteger[#])]&]
PROG
(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 itertools import filterfalse
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
def A338556(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)-(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))))
return bisection(f, n, n) # Chai Wah Wu, Oct 18 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 08 2020
STATUS
approved