OFFSET
1,1
COMMENTS
If all duplicates are removed the result is A036913. The indices where a(n) takes a new value are A036912. - Jeppe Stig Nielsen, Sep 28 2021
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Totient Function
Wikipedia, Euler's totient function
MATHEMATICA
inversePhi[m_?EvenQ] := Module[{p, nmax, n, nn}, p = Select[Divisors[m]+1, PrimeQ]; nmax = m*Times @@ (p/(p-1)); n = m; nn = {}; While[n <= nmax, If[EulerPhi[n] == m, AppendTo[nn, n]]; n++]; nn]; a[1] = 2; a[n_?OddQ] := a[n-1]; a[n_] := a[n] = Module[{m}, m = inversePhi[n] // Max; If[m > a[n-1], m, a[n-1]]]; Table[a[n], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Jean-François Alcover, Jan 08 2015
STATUS
approved