OFFSET
1,2
COMMENTS
The set union of this sequence is 1 U A007369.
LINKS
Michel Marcus, Table of n, a(n) for n = 1..2503
FORMULA
EXAMPLE
For n = 5, A002191(5) is 7, and 4 iterations of sigma applied to 2 give 7, and no integer less than 2 will give 7, so a(5)=2.
PROG
(PARI) list(lim) = select(n->n<=lim, Set(vector(lim\=1, n, sigma(n))));
lista(nn) = {my(vs = list(nn), v = vector(#vs)); v[1] = 1; for (n=2, #vs, for (k=2, vs[n], my(kk=k); while (sigma(kk) <= vs[n], kk=sigma(kk)); if (kk == vs[n], v[n] = k; break); ); ); v; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Oct 14 2019
STATUS
approved