%I #12 Oct 20 2024 13:01:09
%S 110,170,230,310,374,410,470,506,590,670,682,730,782,830,902,935,970,
%T 1030,1034,1054,1090,1265,1270,1298,1370,1394,1426,1474,1490,1570,
%U 1598,1606,1670,1705,1790,1826,1886,1910,1955,1970,2006,2110,2134,2162,2255,2266
%N Heinz numbers of strict integer partitions with 3 parts, all of which are odd.
%C The enumeration of these partitions by sum is given by A001399.
%C The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
%e The sequence of terms together with their prime indices begins:
%e 110: {1,3,5}
%e 170: {1,3,7}
%e 230: {1,3,9}
%e 310: {1,3,11}
%e 374: {1,5,7}
%e 410: {1,3,13}
%e 470: {1,3,15}
%e 506: {1,5,9}
%e 590: {1,3,17}
%e 670: {1,3,19}
%e 682: {1,5,11}
%e 730: {1,3,21}
%e 782: {1,7,9}
%e 830: {1,3,23}
%e 902: {1,5,13}
%e 935: {3,5,7}
%e 970: {1,3,25}
%e 1030: {1,3,27}
%e 1034: {1,5,15}
%e 1054: {1,7,11}
%t Select[Range[1000],SquareFreeQ[#]&&PrimeNu[#]==3&&OddQ[Times@@PrimePi/@First/@FactorInteger[#]]&]
%o (Python)
%o from math import isqrt
%o from sympy import primepi, primerange, integer_nthroot, nextprime
%o def A307534(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>>1)-(b+1>>1) for a,k in filter(lambda x:x[0]&1,enumerate(primerange(2,integer_nthroot(x,3)[0]+1),1)) for b,m in filter(lambda x:x[0]&1,enumerate(primerange(nextprime(k)+1,isqrt(x//k)+1),a+2))))
%o return bisection(f,n,n) # _Chai Wah Wu_, Oct 20 2024
%Y Cf. A001221, A001222, A001399, A005117, A007304, A014612, A037144, A051037, A056239, A080193, A080257, A112798, A143207, A304636.
%K nonn
%O 1,1
%A _Gus Wiseman_, Apr 13 2019