OFFSET
0,2
COMMENTS
LINKS
MATHEMATICA
b = MixedRadix[Reverse@ Prime@ Range@ 12]; f[n_] := Times @@ MapIndexed[Prime[#2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]] - Boole[n == 1]; With[{nn = 102}, Function[s, Table[Position[Keys@ s, k_ /; MemberQ[k, n]][[1, 1]], {n, nn}]]@ Map[#1 -> #2 & @@ # &, Transpose@ {Values@ #, Keys@ #}] &@ PositionIndex@ Table[Function[k, f[Times @@ Power @@@ # &@ Transpose@ {Prime@ Range@ Length@ k, Reverse@ k}]]@ IntegerDigits[n, b], {n, 0, nn}]] (* Michael De Vlieger, May 12 2017, Version 10.2 *)
PROG
(PARI)
rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences, invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences, invec[i], i); outvec[i] = u; u++ )); outvec; };
write_to_bfile(start_offset, vec, bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from Charles R Greathouse IV, Aug 17 2011
A276086(n) = { my(i=0, m=1, pr=1, nextpr); while((n>0), i=i+1; nextpr = prime(i)*pr; if((n%nextpr), m*=(prime(i)^((n%nextpr)/pr)); n-=(n%nextpr)); pr=nextpr); m; };
write_to_bfile(0, rgs_transform(vector(30031, n, A278226(n-1))), "b286626.txt");
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, May 11 2017
STATUS
approved