A328401 Lexicographically earliest infinite sequence such that a(i) = a(j) => A328400(i) = A328400(j) for all i, j.
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, 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, 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
Offset: 1
Keywords
Examples
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. 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. 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).
Links
Crossrefs
Programs
-
PARI
up_to = 100000; 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; }; A007947(n) = factorback(factorint(n)[, 1]); A181819(n) = factorback(apply(e->prime(e),(factor(n)[,2]))); v328401 = rgs_transform(vector(up_to, n, A007947(A181819(n)))); \\ Faster than with A328400(n). A328401(n) = v328401[n];
Comments