OFFSET
1,2
COMMENTS
Starting with any integer and repeatedly applying the map x -> a(x) reaches the fixed point 12 or the loop {3, 4}.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
Sum_{k=1..n} a(k) ~ c * n^2, where c = (zeta(6)/(2*zeta(2)*zeta(3))) * Product_{p prime} (1 + 2/p^2) = 0.56361239505... . - Amiram Eldar, Nov 12 2022
EXAMPLE
a(2^s) = 3 for all s>0.
MAPLE
f:= proc(n) local t;
mul((t[1]+1)*(t[1]-1)^(t[2]-1), t=ifactors(n)[2])
end proc:
map(f, [$1..100]); # Robert Israel, Jan 07 2021
MATHEMATICA
fa[n_]:=fa[n]=FactorInteger[n];
phi[1]=1; phi[p_, s_]:= (p + 1)*( p - 1)^(s - 1)
phi[n_]:=Product[phi[fa[n][[i, 1]], fa[n][[i, 2]]], {i, Length[fa[n]]}];
Array[phi, 245]
PROG
(PARI) A340323(n) = if(1==n, n, my(f=factor(n)); prod(i=1, #f~, (f[i, 1]+1)*((f[i, 1]-1)^(f[i, 2]-1)))); \\ Antti Karttunen, Jan 06 2021
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
José María Grau Ribas, Jan 04 2021
STATUS
approved