%I #19 Nov 09 2018 03:10:53
%S 2,3,5,119,57,220,1131,2986,1505,3211,21300,26795,11820,14575,67385,
%T 221051,33782,132512,819236,1478432,1630903,26736550,1095752,41815849,
%U 24813938,31982450,142574286,860986855,602660826,2638930495,2664421881,1309662955,33767540563
%N a(n) is the least k such that in the prime power factorization of k! the exponents of primes p_1, ..., p_n are odd, while the exponent of p_(n+1) is even.
%C Analog to A240537 where odd and even are swapped.
%H Giovanni Resta, <a href="/A321362/b321362.txt">Table of n, a(n) for n = 1..37</a> (terms < 10^12)
%H Rémy Sigrist, <a href="/A321362/a321362.txt">C program for A321362</a>
%e For k=2, 2!=2 with factorization 2 where the first exponent is odd.
%e For k=3, 3!=6 with factorization 2*3 where the first 2 exponents are odd.
%e For k=5, 5!=120 with factorization 2*3*5 where the first 3 exponents are odd.
%e In each case, there are no lesser numbers with the same property.
%t aQ[k_,n_] := Module[{e=FactorInteger[k!][[;;,2]]}, Length[e]>=n && AllTrue[ e[[1;;n]], OddQ ] && If[Length[e]>n, EvenQ[e[[n+1]]], True]]; a[n_] := Module[ {k=2}, While[!aQ[k,n], k++]; k ]; Array[a,10] (* _Amiram Eldar_, Nov 07 2018 *)
%o (PARI) isok(v, n) = {if (#v < n, return (0)); for (i=1, n, if (!(v[i] % 2), return(0));); (#v == n) || !(v[n+1] % 2);}
%o newv(v, i) = {if (isprime(i), return(concat(v, 1))); f = factor(i); for (k=1, #f~, v[primepi(f[k,1])] += f[k,2];); return (v);}
%o a(n) = {my(v =[1], i = 2); while (!isok(v, n), i++; v = newv(v, i)); i;}
%o (C) See Links section.
%Y Cf. A115627, A240537.
%K nonn
%O 1,1
%A _Michel Marcus_, Nov 07 2018
%E a(16)-a(32) from _Rémy Sigrist_, Nov 08 2018
%E a(33) from _Giovanni Resta_, Nov 09 2018