OFFSET
1,2
COMMENTS
Since a(n) < n for any odd n > 1, iterating this function always leads to 1.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
FORMULA
Multiplicative with a(p^e) = oddpart(p^e+1), where oddpart(n) = A000265(n) is the largest odd divisor of n.
MATHEMATICA
Table[NestWhile[#/2 &, DivisorSum[n, # &, CoprimeQ[#, n/#] &], EvenQ@ # &], {n, 85}] (* Michael De Vlieger, Nov 23 2017 *)
a[n_] := Times @@ ((#/2^IntegerExponent[#, 2]) & /@ (1 + Power @@@ FactorInteger[n])); Array[a, 100] (* Amiram Eldar, Oct 26 2023 *)
PROG
(PARI) oddpart(n)=n/2^valuation(n, 2)
a(n)=local(fm, r); fm=factor(n); r=1; for(k=1, matsize(fm)[1], r*=oddpart(fm[k, 1]^fm[k, 2]+1)); r
CROSSREFS
KEYWORD
easy,mult,nonn
AUTHOR
Franklin T. Adams-Watters, Jun 22 2009
STATUS
approved