%I #10 Dec 01 2022 11:04:01
%S 1,4,9,2,25,36,49,8,3,100,121,18,169,196,225,32,289,12,361,50,441,484,
%T 529,72,5,676,27,98,841,900,961,16,1089,1156,1225,6,1369,1444,1521,
%U 200,1681,1764,1849,242,75,2116,2209,288,7,20,2601,338,2809,108,3025,392
%N a(n) is the smallest positive integer not yet in the sequence such that n * a(n) is a cube.
%C This is a self-inverse permutation of the positive integers.
%H Amiram Eldar, <a href="/A159253/b159253.txt">Table of n, a(n) for n = 1..10000</a>
%F Multiplicative with a(p^{3n}) = p^{3n}, a(p^{3n+1}) = p^{3n+2), and a(p^{3n+2)) = p^{3n+1).
%F Sum_{k=1..n} a(k) ~ c * n^3, where c = (zeta(6)/(3*zeta(3))) * Product_{p prime} (1 - 1/p^2 + 1/p^3) = A347328 * A330596 / 3 = 0.2111705... . - _Amiram Eldar_, Dec 01 2022
%t f[p_, e_] := If[(r = Mod[e, 3]) == 0, p^e, p^(e - (-1)^r)]; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* _Amiram Eldar_, Aug 29 2019 *)
%o (PARI) a(n) = {my(f = factor(n), r); prod(i = 1, #f~, r=f[i,2]%3; f[i,1]^if(r == 0, f[i,2], f[i,2]-(-1)^r));} \\ _Amiram Eldar_, Dec 01 2022
%Y Cf. A064429 (function on exponents)
%Y Cf. A330596, A347328.
%K mult,nonn
%O 1,2
%A _Franklin T. Adams-Watters_, Apr 07 2009
|