login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the least number k such that A373531(k) = n, or -1 if no such k exists.
1

%I #12 Jun 10 2024 15:00:22

%S 1,2,12,120,240,3276,2520,10920,21840,32760,65520,622440,600600,

%T 900900,3636360,1801800,3603600,4455360,22407840,8910720,17821440,

%U 51351300,46060560,69090840,92121120,126977760,138181680,380933280,245044800,414545040,490089600,507911040

%N a(n) is the least number k such that A373531(k) = n, or -1 if no such k exists.

%F a(n) >= A061799(n).

%t f[n_] := Max[Tally[EulerPhi[Divisors[n]]][[;; , 2]]]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n]; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[12, 10^6]

%o (PARI) f(n) = vecmax(matreduce(apply(x->eulerphi(x), divisors(n)))[ , 2]);

%o lista(nmax, kmax = oo) = {my(v = vector(nmax), k = 1, c = 0, i); while(c < nmax && k < kmax, i = f(k); if(i <= nmax && v[i] == 0, c++; v[i] = k); k++); v}

%o (Python)

%o from collections import Counter

%o from itertools import count, islice

%o from sympy import divisors, totient

%o def agen(): # generator of terms

%o adict, n = dict(), 1

%o for k in count(1):

%o divs = divisors(k)

%o if len(divs) < n:

%o continue

%o c = Counter(totient(d) for d in divs)

%o v = c.most_common(1)[0][1]

%o if v not in adict:

%o adict[v] = k

%o while n in adict:

%o yield adict[n]

%o n += 1

%o print(list(islice(agen(), 11))) # _Michael S. Branicky_, Jun 08 2024

%Y Cf. A061799, A328857, A373531.

%K nonn

%O 1,2

%A _Amiram Eldar_, Jun 08 2024