OFFSET
1,2
COMMENTS
This is a self-inverse permutation of the positive integers.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(p^{3n}) = p^{3n}, a(p^{3n+1}) = p^{3n+2), and a(p^{3n+2)) = p^{3n+1).
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
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
KEYWORD
mult,nonn
AUTHOR
Franklin T. Adams-Watters, Apr 07 2009
STATUS
approved