login
Lexicographically earliest infinite sequence such that a(i) = a(j) => A328400(i) = A328400(j) for all i, j.
2

%I #20 Oct 18 2019 11:28:51

%S 1,2,2,3,2,2,2,4,3,2,2,5,2,2,2,6,2,5,2,5,2,2,2,7,3,2,4,5,2,2,2,8,2,2,

%T 2,3,2,2,2,7,2,2,2,5,5,2,2,9,3,5,2,5,2,7,2,7,2,2,2,5,2,2,5,10,2,2,2,5,

%U 2,2,2,11,2,2,5,5,2,2,2,9,6,2,2,5,2,2,2,7,2,5,2,5,2,2,2,12,2,5,5,3,2,2,2,7,2

%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A328400(i) = A328400(j) for all i, j.

%C Restricted growth sequence transform of A328400(n), or equally, of A007947(A181819(n)).

%C For all i, j:

%C A101296(i) = A101296(j) => a(i) = a(j),

%C a(i) = a(j) => A051903(i) = A051903(j) => A008966(i) = A008966(j),

%C a(i) = a(j) => A051904(i) = A051904(j),

%C a(i) = a(j) => A052409(i) = A052409(j),

%C a(i) = a(j) => A072411(i) = A072411(j),

%C a(i) = a(j) => A071625(i) = A071625(j),

%C a(i) = a(j) => A267115(i) = A267115(j),

%C a(i) = a(j) => A267116(i) = A267116(j).

%H Antti Karttunen, <a href="/A328401/b328401.txt">Table of n, a(n) for n = 1..100000</a>

%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>

%e Numbers 2 (= 2^1), 3 (= 3^1), 6 = (2^1 * 3^1) and 30 (2^1 * 3^1 * 5^1) all have just one distinct exponent, 1, in the multisets of exponents that occur in their prime factorization, thus they all have the same value a(2) = a(3) = a(6) = a(30) = 2 in this sequence.

%e Number 4 (2^2), 9 (3^2) and 36 (2^2 * 3^2) all have just one distinct exponent, 2, in the multisets of exponents that occur in their prime factorization, thus they all have the same value a(4) = a(9) = a(36) = 3 in this sequence.

%e Numbers 12 = 2^2 * 3^1, 18 = 2^1 * 3^2, 60 = 2^2 * 3^1 * 5^1 and 300 = 2^2 * 3^1 * 5^2 all have both 1 and 2 and none other values occurring in the multisets of exponents in their prime factorization, thus they all have the value of a(12) = 5 that was allotted to 12 by the restricted growth sequence transform, as 12 is the smallest number with prime signature (1, 2).

%o (PARI)

%o up_to = 100000;

%o rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };

%o A007947(n) = factorback(factorint(n)[, 1]);

%o A181819(n) = factorback(apply(e->prime(e),(factor(n)[,2])));

%o v328401 = rgs_transform(vector(up_to, n, A007947(A181819(n)))); \\ Faster than with A328400(n).

%o A328401(n) = v328401[n];

%Y Cf. A007947, A181819, A328400.

%Y Cf. A005117 (gives indices of terms <= 2), A062503 (after its initial 1, gives indices of 3's).

%Y Cf. A008966, A051903, A051904, A052409, A072411, A071625, A267115, A267116.

%K nonn

%O 1,2

%A _Antti Karttunen_, Oct 17 2019