OFFSET
0,2
COMMENTS
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Donovan Johnson, Table of n, a(n) for n = 0..66 (terms < 10^10)
R. K. Guy, Letter to N. J. A. Sloane, Apr 1975
M. Lal, Iterates of the unitary totient function, Math. Comp., 28 (1974), 301-302.
MATHEMATICA
uphi[n_ /; n <= 1] = 1; uphi[n_] := uphi[n] = (f = FactorInteger[n]; Times @@ (f[[All, 1]]^f[[All, 2]] - 1));
b[n_] := (k = 0; FixedPoint[(k++; uphi[#])&, n]; k - 1);
a[0] = 1; a[n_] := a[n] = For[an = a[n-1], True, an++, If[b[an] == n, Return[an]]];
Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 0, 42}] (* Jean-François Alcover, Oct 05 2017 *)
PROG
(Haskell)
import Data.List (elemIndex)
import Data.Maybe (fromJust)
a003271 n = a003271_list !! n
a003271_list = map ((+ 1) . fromJust . (`elemIndex` a049865_list)) [0..]
-- Reinhard Zumkeller, Aug 17 2011
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
EXTENSIONS
More terms from David W. Wilson
STATUS
approved