OFFSET
0,2
EXAMPLE
n The n iterations of a(n) under the map x -> A348158(x)
- --------------------------------------------------------------------------------
0 1
1 2 -> 1
2 64 -> 63 -> 57
3 50624 -> 49833 -> 49155 -> 48819
4 235053 -> 231363 -> 223245 -> 222885 -> 210693
5 15800785 -> 15775305 -> 15763125 -> 15761925 -> 15208875 -> 14889335
6 36903321 -> 36323991 -> 35049465 -> 34992945 -> 33078801 -> 32940117 -> 29802963
7 4038974856 -> 2855346375 -> 2854284615 -> 2556863361 -> 2549117805 -> 2536180173 -> 2447191395 -> 2445883515
MATHEMATICA
f[n_] := Plus @@ DeleteDuplicates @ Map[EulerPhi, Divisors[n]]; s[n_] := -2 + Length @ FixedPointList[f, n]; seq[m_, lim_] := Module[{t = Table[0, {m}], c = 0, n = 1}, While[c < m && n < lim, i = s[n] + 1; If[i <= m && t[[i]] == 0, c++; t[[i]] = n]; n++]; TakeWhile[t, # > 0 &]]; seq[5, 10^6]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Amiram Eldar, Oct 07 2021
STATUS
approved