\\ A short PARI-program to compute OEIS-sequence A351029 "Number of integers whose arithmetic derivative is equal to the n-th primorial."
\\ and A366890 "Numbers k whose arithmetic derivative (A003415) is a primorial number (A002110) > 1 and A001222(k) > 2."
\\ First draft, 2024-01-09 by Antti Karttunen
\\ Second edition, 2024-01-16 by Antti Karttunen (Last edited 2024-01-21).

\\ Load into PARI with command: read("A369239.gp.txt");

\\ This algorithm is based on the following facts:
\\ A327978 (numbers whose arithmetic derivative is a primorial number > 1)
\\ is a subsequence of A327862 (numbers whose arithmetic derivative is of the form 4k+2),
\\ which in turn is a subsequence of A235992 (numbers with an even arithmetic derivative),
\\ which is an union of multiples of 4 and odd numbers with an even number of prime factors with multiplicity.
\\ Because arithmetic derivative of any multiple of 4 is still multiple of 4, it leaves only the latter choice.
\\ Furthermore, A327978 is a subsequence of A004709 (cubefree numbers: numbers that are not divisible by any cube > 1),
\\ therefore we need to consider only weakly increasing sequences of odd primes (3, 5, 7, 11, ...) of even length,
\\ where any prime is duplicated at most once, but no more.
\\ For increasing prime p, A003415(p*n) = n + p*A003415(n) is a strictly monotonic sequence for any n > 1,
\\ so we can optimize the last prime off from the prime-list and iterate over one element shorter sequences.
\\ As A003415(p*n) = n + p*A003415(n), so p = (A003415(p*n)-n) / A003415(n).

\\ On the other hand:
\\ when searching for terms of A328243 Numbers whose arithmetic derivative (A003415) is larger than 1 and one of the terms of A143293 (partial sums of primorials). 
\\ We note that the terms of A143293 (partial sums of primorials) are all odd,
\\ therefore A328243 is a subsequence of A235991 ("numbers with an odd arithmetic derivative"),
\\ where n is included iff either n is congruent to 2 modulo 4 or n and bigomega(n) are both odd.
\\ I.e., if the prime vector does not begin with 2, then it must be of odd length (our test vector thus has to be of even length)
\\ and if the prime vector begins with 2, then just a single 2, which maybe followed by odd or even number of odd primes.

\\ Terms of A143293 (partial sums of primorials) factored from term A143293(1) onward:
\\ n      A143293(n)
\\ 1: (1) 3,
\\ 2: (2) 9 = 3^2,
\\ 3: (1) 39 = 3 * 13,
\\ 4: (1) 249 = 3 * 83
\\ 5: (1) 2559 = 3 * 853,
\\ 6: (3) 32589 = 3^3 * 17 * 71,
\\ 7: (1) 543099 = 3 * 17 * 23 * 463,
\\ 8: (1) 10242789 = 3 * 17 * 107 * 1877,
\\ 9: (1) 233335659 = 3 * 17 * 83 * 199 * 277,
\\ 10: (1) 6703028889 = 3 * 17 * 131431939,
\\ 11: (2) 207263519019 = 3^2 * 17 * 1354663523,
\\ 12: (1) 7628001653829 = 3 * 17 * 2441 * 61273519,
\\ 13: (3) 311878265181039 = 3^3 * 17 * 967 * 1361 * 516283,
\\ 14: (1) 13394639596851069 = 3 * 17 * 211 * 6211 * 200408839,
\\ 15: (2) 628284422185342479 = 3^2 * 17^2 * 257 * 939902525047,
\\ 16: (1) 33217442899375387209 = 3 * 17 * 239 * 4447 * 372059 * 1647097,
\\ 17: (7) 1955977793053588026279 = 3^7 * 17 * 229 * 30307 * 7580324267,
\\ 18: (1) 119244359152460559009549 = 3 * 17 * 83 * 983 * 1361 * 21056099898931,
\\ 19: (1) 7977565910232727614888639 = 3 * 17 * 165341831 * 946057389342419,
\\ 20: (1) 565918396036931688582304029 = 3 * 17 * 101617081 * 109198562178528359,
\\ 21: (2) 41295598995285955839203627499 = 3^2 * 17 * 307 * 9077062327 * 96856472078647,
\\ 22: (1) 3258940366335958863738288181629 = 3 * 17 * 472332377317 * 135287764645228387,
\\ 23: (2) 270323456055611810219362306174419 = 3^2 * 17 * 708403 * 2494088780284223858613641,
\\ 24: (1) 24039065352401162580869899907532729 = 3 * 17 * 742549 * 1226058103 * 517739419645781857,
\\ 25: (1) 2329607029297919587333972047239288799 = 3 * 17 * 359 * 973554381147437 * 130694655364739903,
\\ 26: (1) 235191971387795280487397288927746651869 = 3 * 17 * 47777 * 96523584195609455401831010215247,
\\ 27: (2) 24220015500313023453193918927620005048079 = 3^2 * 17 * 433 * 23087 * 1540519801 * 10279223329140934304033,
\\ 28: (2) 2590596133095312437932791734267691653442549 = 3 * 17^2 * 170363 * 3097509733 * 5662297146975862008172993,
\\ 29: (1) 282325592950950248616208953606335501328439779 = 3 * 17 * 200499407099613708287 * 27610036459930141536367,
\\
\\ The first 18 terms of A328243 factored:
\\ 14 = 2 * 7, A003415(14) = 9.
\\ 45 = 3^2 * 5, A003415(45) = 39.
\\ 74 = 2 * 37,
\\ 198 = 2 * 3^2 * 11, A003415(198) = 249.
\\ 5114 = 2 * 2557,
\\ 10295 = 5 * 29 * 71,
\\ 65174 = 2 * 32587,
\\ 1086194 = 2 * 543097,
\\ 20485574 = 2 * 10242787,
\\ 40354813 = 97 * 541 * 769,
\\ 465779078 = 2 * 1049 * 222011,    \\ Note: begins with 2, but with an odd number of primes in total. A003415(465779078) = 233335659.
\\ 12101385979 = 79 * 151 * 1014451,
\\ 15237604243 = 67 * 2659 * 85531,
\\ 18046312939 = 79 * 3931 * 58111,
\\ 29501083259 = 179 * 431 * 382391,
\\ 52467636437 = 233 * 8501 * 26489,
\\ 65794608773 = 449 * 761 * 192557,
\\ 86725630997 = 449 * 2213 * 87281,
\\




vminsols = vector(101); \\ A368703 o=0: a(n) is the least integer k for which A003415(k) = A002110(n), and 0 if no such k exists.
vmaxsols = vector(101); \\ A368704 o=1: a(n) is the greatest integer k for which A003415(k) = A002110(n), and 0 if no such k exists.

A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); }; \\ From A003557

A002110(n) = prod(i=1,n,prime(i));
A143293(n) = if(!n,A002110(n),A002110(n)+A143293(n-1));

A003415vec(tv) = { my(n=factorback(tv), s=0, m=1, spf); for(i=1,#tv,spf = tv[i]; n /= spf; s += m*n; m *= spf); (s); }; \\ Compute Arithmetic derivative from the vector of primes.


\\ The following function returns:
\\   0 if max(pv) > (lim-factorback(pv))/A003415(factorback(pv)) [indicating that it's useless to continue and we should backtrack, i.e., call nextvector, or maybe even stop]
\\   p when lim = p*A003415(pv) + 1*pv, with some p >= max(pv), i.e., when lim-factorback(pv) is a divisible by A003415(factorback(pv)) and the divisor is a prime p.
\\   otherwise returns 1 if max(pv) < (lim-factorback(pv))/A003415(factorback(pv)) [indicating that we should just bump up the rightmost prime]


A003415vrl(pv,lim) = { my(n=factorback(pv), x=lim-n, s=0, m=1, spf, u=n); for(i=1,#pv,spf = pv[i]; u /= spf; s += m*u; m *= spf); if(((x/s)<pv[#pv]),0,if(!(x%s) && isprime(x/s),(x/s),1)); };

firstvector_for_primorials(vl) = vector(vl,i,prime(2+((i-1)>>1))); \\ Just [3,3,5,5,7,7,11,11,...]
nextvector_for_primorials(tv,ip) = { my(nv=tv); nv[ip]=nextprime(1+nv[ip]); for(i=1+ip,#nv,if(i>2 && nv[i-1]==nv[i-2], nv[i]=nextprime(1+nv[i-1]), nv[i]=nv[i-1])); (nv); };

\\ pf_map_for_A143293 is initialized in the start of subsearch for the solutions to n' = A143293(n) as Map(factor(A003557(u)))
\\ so that it contains just those primes as its keys which occur with exponent e larger than 1 in A143293(n) (with e-1 as the corresponding value)
\\ so as to tell nextvector_for_A143293 which specific prime (duplicates of) may occur so many extra times more in the test-vector:

pf_map_for_A143293 = Map();

nextvector_for_A143293(tv,ip) =
  { my(nv=tv, mm=2, e);
    nv[ip] = nextprime(1+nv[ip]); \\ Bump up the prime at the increment point
    if(mapisdefined(pf_map_for_A143293,nv[ip],&e), mm = 2+e, mm = 2); \\ Does that bumped up prime allow for extra duplicates?
\\ Then bump up the remaining primes at right, allowing a proper amount of duplicates of each:
    for(i=1+ip,#nv,
          if((i>mm && nv[i-1]==nv[i-mm]) || (2==i && 2==nv[1]), \\ Allow only a single 2 in the beginning.
              nv[i]=nextprime(1+nv[i-1]);
              if(mapisdefined(pf_map_for_A143293,nv[i],&e), mm = 2+e, mm = 2), \\ Does this prime allow extra duplicates?
              \\ Otherwise just duplicate the prime at left:
              nv[i]=nv[i-1]
	    )
       );
    (nv);
  };


firstvector_for_A143293(vl) =
  {
    my(iv = vector(vl));
    iv[1] = 1;
    return(nextvector_for_A143293(iv,1));
  };



\\ For vl=3 and size=5 (A002210(5) = 2310) we iterate over the following 24 prime-vectors:

\\ tv=[3, 3, 5]   ip=3
\\ tv=[3, 3, 7]   ip=3
\\ tv=[3, 3, 11]  ip=3
\\ tv=[3, 3, 13]  ip=3
\\ tv=[3, 3, 17]  ip=3
\\ tv=[3, 3, 19]  ip=3
\\ tv=[3, 5, 5]   ip=2
\\ tv=[3, 5, 7]   ip=3
\\ tv=[3, 5, 11]  ip=3
\\ tv=[3, 5, 13]  ip=3
\\ tv=[3, 5, 17]  ip=3
\\ tv=[3, 7, 7]   ip=2
\\ tv=[3, 7, 11]  ip=3
\\ tv=[3, 7, 13]  ip=3
\\ tv=[3, 7, 17]  ip=3
\\ tv=[3, 11, 11] ip=2
\\ tv=[5, 5, 7]   ip=1
\\ tv=[5, 5, 11]  ip=3
\\ tv=[5, 5, 13]  ip=3
\\ tv=[5, 7, 7]   ip=2
\\ tv=[5, 7, 11]  ip=3
\\ tv=[5, 7, 13]  ip=3
\\ tv=[5, 11, 11] ip=2
\\ tv=[7, 7, 11]  ip=1

\\ To do 1: Make an optimization which will skip the iteration over triplets of three odd primes when u is not of the form 4m+3.
\\ To do 2: develop a general antiderivatives or invA003415 routine, like there are invphi and invsigma.

loop_over_prime_vectors_of_length(vl,size,u,deb,nextvector,firstvector,solsfile_name) = {
  my(f, ip=vl, c=0, totits=0, previts=0, tv = firstvector(vl), sol);
  if(deb,print("Initial tv=",tv, " ip=",ip));
  while(1,totits++;
          f = A003415vrl(tv,u);
          if(f, \\ Still makes sense to keep on incrementing the last prime in tv?
             ip = vl; \\ So set or keep the ip pointing at the rightmost prime.
             if(f>1, c++; \\ Found a solution (f is then our missing prime).
                   sol = f*factorback(tv);
                   if(!vminsols[size] || sol < vminsols[size], vminsols[size] = sol);
                   if(sol > vmaxsols[size], vmaxsols[size] = sol);
                   if("" != solsfile_name, write(solsfile_name,sol));
                   if(deb && (solsfile_name!="" || vl>1), print("Found a ",if(vl>1,"non",""),"semiprime solution: ",concat(tv,[f])," = ",sol));
               ),
             /* Otherwise (when A003415vrl returned 0) we should backtrack towards left: */
             ip = ip-1;
  	  );

          if(!ip \\ Either we have backtracked all the way to the left, and no more solutions can be found
             ||  \\ Or...
             (2==tv[ip] && (vl%2)), \\ (a kludge for A369239): the initial prime is 2 and we are iterating over
                                    \\ the odd length vectors, then we should not consider any odd length vectors beginning with an odd prime, but instead return immediately.
                if(deb, print("Size=",size,": Loop over vectors of length ",vl," finished. Last tv=",tv,". Number of iterations: ",totits,". Number of solutions: ", c));
                return(c);
            );

          if(ip==vl, tv[vl] = nextprime(1+tv[vl]), \\ Keep on bumping up the rightmost (largest) prime in the vector (just an optimization)
                     tv = nextvector(tv,ip) \\ As this would suffice in both cases.
            );
  
          if(2==deb,print("tv=",tv, " ip=",ip));

          if((3==deb && tv[1]!=tv[2])
               ||
             (4==deb && 1==ip && vl>1),
             print("tv=",tv, " its=", totits-previts); \\ Show the test vector always when we have backtracked to its start.
             previts = totits;
  	  )
       );
};



A351029_or_A369000(n,vls,solsfile_name) = {
               my(u=A002110(n), s=0, firstvector=firstvector_for_primorials);
               forstep(vl=vls,oo,2,
                         if(A003415vec(firstvector(vl)) > u,
                            break,
                            s += loop_over_prime_vectors_of_length(vl,n,u,4+(vl==1),nextvector_for_primorials,firstvector,solsfile_name);
                           )
                      );
               if(1==vls, write("b368703.txt", n, " ", vminsols[n]));
               if(1==vls, write("b368704.txt", n, " ", vmaxsols[n]));

               return(s);
};


A351029(n) = A351029_or_A369000(n,1,"");

A369000(n) = A351029_or_A369000(n,3,"b366890_terms_found_by_the_search_order.txt"); \\ Exclude the Goldbachian solutions, start straight from the test-prime vectors of length 3.



A369239(n) = {
               my(u=A143293(n), s=0,vls=1,firstvector=firstvector_for_A143293);
               forstep(vl=vls,oo,1,
                         pf_map_for_A143293 = Map(factor(A003557(u))); \\ nextvector_for_A143293 will refer to this global variable.
                         if(A003415vec(firstvector(vl)) > u,
                            break,
                            s += loop_over_prime_vectors_of_length(vl,n,u,4,nextvector_for_A143293,firstvector,"b369240_terms_found_by_the_search_order.txt");
                           )
                      );
               write("b369243.txt", n, " ", vminsols[n]);
               write("b369244.txt", n, " ", vmaxsols[n]);

               return(s);
};



for(n=1,10,write("b369239.txt", n, " ", A369239(n)));
print("A369243 = ",concat([2], vminsols));
print("A369244 = ",vmaxsols);

\\ for(n=1,8,write("b351029.txt", n, " ", A351029(n)));

return(1/0); \\ Bomb out!

\\ for(n=1,10,write("b369000.txt", n, " ", A369000(n))); \\ Takes days.

\\ print("A369239(9)=", A369239(9));

\\ print("A369239(3)=", A369239(3));


\\ for(n=1,8,write("b369239.txt", n, " ", A369239(n)));

\\ for(n=1,8,write("b369000.txt", n, " ", A369000(n)));

\\ for(n=1,11,write("b351029.txt", n, " ", A351029(n)));
print("A368703 = ",concat([2], vminsols));
print("A368704 = ",vmaxsols);

\\ for(n=1,13,write("b369000.txt", n, " ", A369000(n))); \\ Takes days.

return(0);

\\ For vl=3 and size=5 (A002110(6) = 30030) we iterate over the following 217 prime-vectors:

\\ tv=[3, 3, 5] ip=3
\\ tv=[3, 3, 7] ip=3
\\ tv=[3, 3, 11] ip=3
\\ tv=[3, 3, 13] ip=3
\\ tv=[3, 3, 17] ip=3
\\ tv=[3, 3, 19] ip=3
\\ tv=[3, 3, 23] ip=3
\\ tv=[3, 3, 29] ip=3
\\ tv=[3, 3, 31] ip=3
\\ tv=[3, 3, 37] ip=3
\\ tv=[3, 3, 41] ip=3
\\ tv=[3, 3, 43] ip=3
\\ tv=[3, 3, 47] ip=3
\\ tv=[3, 3, 53] ip=3
\\ tv=[3, 3, 59] ip=3
\\ tv=[3, 3, 61] ip=3
\\ tv=[3, 3, 67] ip=3
\\ tv=[3, 3, 71] ip=3
\\ tv=[3, 5, 5] ip=2
\\ tv=[3, 5, 7] ip=3
\\ tv=[3, 5, 11] ip=3
\\ tv=[3, 5, 13] ip=3
\\ tv=[3, 5, 17] ip=3
\\ tv=[3, 5, 19] ip=3
\\ tv=[3, 5, 23] ip=3
\\ tv=[3, 5, 29] ip=3
\\ tv=[3, 5, 31] ip=3
\\ tv=[3, 5, 37] ip=3
\\ tv=[3, 5, 41] ip=3
\\ tv=[3, 5, 43] ip=3
\\ tv=[3, 5, 47] ip=3
\\ tv=[3, 5, 53] ip=3
\\ tv=[3, 5, 59] ip=3
\\ tv=[3, 5, 61] ip=3
\\ tv=[3, 7, 7] ip=2
\\ tv=[3, 7, 11] ip=3
\\ tv=[3, 7, 13] ip=3
\\ tv=[3, 7, 17] ip=3
\\ tv=[3, 7, 19] ip=3
\\ tv=[3, 7, 23] ip=3
\\ tv=[3, 7, 29] ip=3
\\ tv=[3, 7, 31] ip=3
\\ tv=[3, 7, 37] ip=3
\\ tv=[3, 7, 41] ip=3
\\ tv=[3, 7, 43] ip=3
\\ tv=[3, 7, 47] ip=3
\\ tv=[3, 7, 53] ip=3
\\ tv=[3, 11, 11] ip=2
\\ tv=[3, 11, 13] ip=3
\\ tv=[3, 11, 17] ip=3
\\ tv=[3, 11, 19] ip=3
\\ tv=[3, 11, 23] ip=3
\\ tv=[3, 11, 29] ip=3
\\ tv=[3, 11, 31] ip=3
\\ tv=[3, 11, 37] ip=3
\\ tv=[3, 11, 41] ip=3
\\ tv=[3, 11, 43] ip=3
\\ tv=[3, 11, 47] ip=3
\\ tv=[3, 13, 13] ip=2
\\ tv=[3, 13, 17] ip=3
\\ tv=[3, 13, 19] ip=3
\\ tv=[3, 13, 23] ip=3
\\ tv=[3, 13, 29] ip=3
\\ tv=[3, 13, 31] ip=3
\\ tv=[3, 13, 37] ip=3
\\ tv=[3, 13, 41] ip=3
\\ tv=[3, 17, 17] ip=2
\\ tv=[3, 17, 19] ip=3
\\ tv=[3, 17, 23] ip=3
\\ tv=[3, 17, 29] ip=3
\\ tv=[3, 17, 31] ip=3
\\ tv=[3, 17, 37] ip=3
\\ tv=[3, 19, 19] ip=2
\\ tv=[3, 19, 23] ip=3
\\ tv=[3, 19, 29] ip=3
\\ tv=[3, 19, 31] ip=3
\\ tv=[3, 19, 37] ip=3
\\ tv=[3, 23, 23] ip=2
\\ tv=[3, 23, 29] ip=3
\\ tv=[3, 23, 31] ip=3
\\ tv=[3, 23, 37] ip=3
\\ tv=[3, 29, 29] ip=2
\\ tv=[5, 5, 7] ip=1
\\ tv=[5, 5, 11] ip=3
\\ tv=[5, 5, 13] ip=3
\\ tv=[5, 5, 17] ip=3
\\ tv=[5, 5, 19] ip=3
\\ tv=[5, 5, 23] ip=3
\\ tv=[5, 5, 29] ip=3
\\ tv=[5, 5, 31] ip=3
\\ tv=[5, 5, 37] ip=3
\\ tv=[5, 5, 41] ip=3
\\ tv=[5, 5, 43] ip=3
\\ tv=[5, 5, 47] ip=3
\\ tv=[5, 5, 53] ip=3
\\ tv=[5, 7, 7] ip=2
\\ tv=[5, 7, 11] ip=3
\\ tv=[5, 7, 13] ip=3
\\ tv=[5, 7, 17] ip=3
\\ tv=[5, 7, 19] ip=3
\\ tv=[5, 7, 23] ip=3
\\ tv=[5, 7, 29] ip=3
\\ tv=[5, 7, 31] ip=3
\\ tv=[5, 7, 37] ip=3
\\ tv=[5, 7, 41] ip=3
\\ tv=[5, 7, 43] ip=3
\\ tv=[5, 7, 47] ip=3
\\ tv=[5, 7, 53] ip=3
\\ tv=[5, 11, 11] ip=2
\\ tv=[5, 11, 13] ip=3
\\ tv=[5, 11, 17] ip=3
\\ tv=[5, 11, 19] ip=3
\\ tv=[5, 11, 23] ip=3
\\ tv=[5, 11, 29] ip=3
\\ tv=[5, 11, 31] ip=3
\\ tv=[5, 11, 37] ip=3
\\ tv=[5, 11, 41] ip=3
\\ tv=[5, 13, 13] ip=2
\\ tv=[5, 13, 17] ip=3
\\ tv=[5, 13, 19] ip=3
\\ tv=[5, 13, 23] ip=3
\\ tv=[5, 13, 29] ip=3
\\ tv=[5, 13, 31] ip=3
\\ tv=[5, 13, 37] ip=3
\\ tv=[5, 13, 41] ip=3
\\ tv=[5, 17, 17] ip=2
\\ tv=[5, 17, 19] ip=3
\\ tv=[5, 17, 23] ip=3
\\ tv=[5, 17, 29] ip=3
\\ tv=[5, 17, 31] ip=3
\\ tv=[5, 17, 37] ip=3
\\ tv=[5, 19, 19] ip=2
\\ tv=[5, 19, 23] ip=3
\\ tv=[5, 19, 29] ip=3
\\ tv=[5, 19, 31] ip=3
\\ tv=[5, 19, 37] ip=3
\\ tv=[5, 23, 23] ip=2
\\ tv=[5, 23, 29] ip=3
\\ tv=[5, 29, 29] ip=2
\\ tv=[7, 7, 11] ip=1
\\ tv=[7, 7, 13] ip=3
\\ tv=[7, 7, 17] ip=3
\\ tv=[7, 7, 19] ip=3
\\ tv=[7, 7, 23] ip=3
\\ tv=[7, 7, 29] ip=3
\\ tv=[7, 7, 31] ip=3
\\ tv=[7, 7, 37] ip=3
\\ tv=[7, 7, 41] ip=3
\\ tv=[7, 7, 43] ip=3
\\ tv=[7, 11, 11] ip=2
\\ tv=[7, 11, 13] ip=3
\\ tv=[7, 11, 17] ip=3
\\ tv=[7, 11, 19] ip=3
\\ tv=[7, 11, 23] ip=3
\\ tv=[7, 11, 29] ip=3
\\ tv=[7, 11, 31] ip=3
\\ tv=[7, 11, 37] ip=3
\\ tv=[7, 13, 13] ip=2
\\ tv=[7, 13, 17] ip=3
\\ tv=[7, 13, 19] ip=3
\\ tv=[7, 13, 23] ip=3
\\ tv=[7, 13, 29] ip=3
\\ tv=[7, 13, 31] ip=3
\\ tv=[7, 13, 37] ip=3
\\ tv=[7, 17, 17] ip=2
\\ tv=[7, 17, 19] ip=3
\\ tv=[7, 17, 23] ip=3
\\ tv=[7, 17, 29] ip=3
\\ tv=[7, 17, 31] ip=3
\\ tv=[7, 19, 19] ip=2
\\ tv=[7, 19, 23] ip=3
\\ tv=[7, 19, 29] ip=3
\\ tv=[7, 19, 31] ip=3
\\ tv=[7, 23, 23] ip=2
\\ tv=[7, 23, 29] ip=3
\\ tv=[7, 29, 29] ip=2
\\ tv=[11, 11, 13] ip=1
\\ tv=[11, 11, 17] ip=3
\\ tv=[11, 11, 19] ip=3
\\ tv=[11, 11, 23] ip=3
\\ tv=[11, 11, 29] ip=3
\\ tv=[11, 11, 31] ip=3
\\ tv=[11, 11, 37] ip=3
\\ tv=[11, 13, 13] ip=2
\\ tv=[11, 13, 17] ip=3
\\ tv=[11, 13, 19] ip=3
\\ tv=[11, 13, 23] ip=3
\\ tv=[11, 13, 29] ip=3
\\ tv=[11, 13, 31] ip=3
\\ tv=[11, 17, 17] ip=2
\\ tv=[11, 17, 19] ip=3
\\ tv=[11, 17, 23] ip=3
\\ tv=[11, 17, 29] ip=3
\\ tv=[11, 19, 19] ip=2
\\ tv=[11, 19, 23] ip=3
\\ tv=[11, 19, 29] ip=3
\\ tv=[11, 23, 23] ip=2
\\ tv=[11, 23, 29] ip=3
\\ tv=[11, 29, 29] ip=2
\\ tv=[13, 13, 17] ip=1
\\ tv=[13, 13, 19] ip=3
\\ tv=[13, 13, 23] ip=3
\\ tv=[13, 13, 29] ip=3
\\ tv=[13, 17, 17] ip=2
\\ tv=[13, 17, 19] ip=3
\\ tv=[13, 17, 23] ip=3
\\ tv=[13, 17, 29] ip=3
\\ tv=[13, 19, 19] ip=2
\\ tv=[13, 19, 23] ip=3
\\ tv=[13, 19, 29] ip=3
\\ tv=[13, 23, 23] ip=2
\\ tv=[17, 17, 19] ip=1
\\ tv=[17, 17, 23] ip=3
\\ tv=[17, 19, 19] ip=2
\\ tv=[17, 19, 23] ip=3
\\ tv=[17, 23, 23] ip=2
\\ tv=[19, 19, 23] ip=1

\\ For vl=5 and size=5 (A002110(6) = 30030) we iterate over the following 12 prime-vectors:

\\ tv=[3, 3, 5, 5, 7] ip=5
\\ tv=[3, 3, 5, 5, 11] ip=5
\\ tv=[3, 3, 5, 7, 7] ip=4
\\ tv=[3, 3, 5, 7, 11] ip=5
\\ tv=[3, 3, 5, 11, 11] ip=4
\\ tv=[3, 3, 7, 7, 11] ip=3
\\ tv=[3, 5, 5, 7, 7] ip=2
\\ tv=[3, 5, 5, 7, 11] ip=5
\\ tv=[3, 5, 5, 11, 11] ip=4
\\ tv=[3, 5, 7, 7, 11] ip=3
\\ tv=[3, 7, 7, 11, 11] ip=2
\\ tv=[5, 5, 7, 7, 11] ip=1

\\ For vl=7 and size=8 (A002110(8) = 9699690)  we iterate over the following 43 prime-vectors:

\\ tv=[3, 3, 5, 5, 7, 7, 11] ip=7
\\ tv=[3, 3, 5, 5, 7, 7, 13] ip=7
\\ tv=[3, 3, 5, 5, 7, 7, 17] ip=7
\\ tv=[3, 3, 5, 5, 7, 7, 19] ip=7
\\ tv=[3, 3, 5, 5, 7, 7, 23] ip=7
\\ tv=[3, 3, 5, 5, 7, 7, 29] ip=7
\\ tv=[3, 3, 5, 5, 7, 11, 11] ip=6
\\ tv=[3, 3, 5, 5, 7, 11, 13] ip=7
\\ tv=[3, 3, 5, 5, 7, 11, 17] ip=7
\\ tv=[3, 3, 5, 5, 7, 11, 19] ip=7
\\ tv=[3, 3, 5, 5, 7, 11, 23] ip=7
\\ tv=[3, 3, 5, 5, 7, 13, 13] ip=6
\\ tv=[3, 3, 5, 5, 7, 13, 17] ip=7
\\ tv=[3, 3, 5, 5, 7, 13, 19] ip=7
\\ tv=[3, 3, 5, 5, 7, 17, 17] ip=6
\\ tv=[3, 3, 5, 5, 11, 11, 13] ip=5
\\ tv=[3, 3, 5, 5, 11, 11, 17] ip=7
\\ tv=[3, 3, 5, 5, 11, 13, 13] ip=6
\\ tv=[3, 3, 5, 5, 11, 13, 17] ip=7
\\ tv=[3, 3, 5, 5, 11, 17, 17] ip=6
\\ tv=[3, 3, 5, 5, 13, 13, 17] ip=5
\\ tv=[3, 3, 5, 7, 7, 11, 11] ip=4
\\ tv=[3, 3, 5, 7, 7, 11, 13] ip=7
\\ tv=[3, 3, 5, 7, 7, 11, 17] ip=7
\\ tv=[3, 3, 5, 7, 7, 11, 19] ip=7
\\ tv=[3, 3, 5, 7, 7, 13, 13] ip=6
\\ tv=[3, 3, 5, 7, 7, 13, 17] ip=7
\\ tv=[3, 3, 5, 7, 7, 17, 17] ip=6
\\ tv=[3, 3, 5, 7, 11, 11, 13] ip=5
\\ tv=[3, 3, 5, 7, 11, 11, 17] ip=7
\\ tv=[3, 3, 5, 7, 11, 13, 13] ip=6
\\ tv=[3, 3, 5, 7, 13, 13, 17] ip=5
\\ tv=[3, 3, 5, 11, 11, 13, 13] ip=4
\\ tv=[3, 3, 7, 7, 11, 11, 13] ip=3
\\ tv=[3, 5, 5, 7, 7, 11, 11] ip=2 A003415(3*5*5*7*7*11*11*13) = 7386610 < A002110(8) = 9699690
\\ tv=[3, 5, 5, 7, 7, 11, 13] ip=7 A003415(3*5*5*7*7*11*13*13) = 8634080 < A002110(8) = 9699690
\\ tv=[3, 5, 5, 7, 7, 11, 17] ip=7
\\ tv=[3, 5, 5, 7, 7, 13, 13] ip=6
\\ tv=[3, 5, 5, 7, 11, 11, 13] ip=5  
\\ tv=[3, 5, 5, 11, 11, 13, 13] ip=4
\\ tv=[3, 5, 7, 7, 11, 11, 13] ip=3
\\ tv=[3, 7, 7, 11, 11, 13, 13] ip=2
\\ tv=[5, 5, 7, 7, 11, 11, 13] ip=1 A003415(5*5*7*7*11*11*13*13) = 25585560 > A002110(8) = 9699690