OFFSET
1,2
COMMENTS
In each a(n) there is enough information to determine the modulo 6 residues of all the prime factors of n (when counted with multiplicity), thus sequences like A319690 and A319691 (which is the characteristic function of A004611) are essentially functions of this sequence. However, to determine that for all divisors of n, more information is needed. See A319717.
For all i, j:
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000
EXAMPLE
For n = 55 = 5*11 and 121 = 11*11, 55 = 121 = 1 mod 6 and 11 is their common largest proper divisor, thus they are allotted the same number by the restricted growth sequence transform, that is a(55) = a(121) = 43 (which is the number allotted). Note that such nontrivial equivalence classes may only contain numbers that are 5-rough, A007310, with no prime factors 2 or 3.
PROG
(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; };
A032742(n) = if(1==n, n, n/vecmin(factor(n)[, 1]));
v319716 = rgs_transform(vector(up_to, n, A286476(n)));
A319716(n) = v319716[n];
CROSSREFS
Cf. also A319714.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 04 2018
STATUS
approved