login
Inverse permutation to A328618.
4

%I #8 Mar 20 2022 21:43:07

%S 1,2,9,4,125,18,2401,8,3,250,1771561,36,62748517,4802,1125,16,

%T 118587876497,6,6131066257801,500,21609,3543122,21914624432020321,72,

%U 5,125497034,27,9604,8629188747598184440949,2250,727423121747185263828481,32,15944049,237175752994,300125,12,624931990990842127748277129373,12262132515602,564736653,1000

%N Inverse permutation to A328618.

%H Antti Karttunen, <a href="/A328619/b328619.txt">Table of n, a(n) for n = 1..707</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%o (PARI) A328619(n) = { my(f = factor(n), m, q); for(k=1, #f~, q = (f[k, 2]\f[k, 1]); m = (f[k, 2]%f[k, 1]); if(m&&(f[k,1]!=2), f[k, 2] = q*f[k, 1] + lift(Mod(m,f[k, 1])/2))); factorback(f); };

%Y Cf. A328617, A328618.

%K nonn,mult

%O 1,2

%A _Antti Karttunen_, Oct 23 2019