Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #45 Nov 19 2019 06:02:43
%S 1,2,2,5,2,2,5,9,9,2,10,19,2,5,29,16,16,22,37,10,27,19,43,33,34,5,49,
%T 2,61,16,67,29,73,45,49,43,27,22,50,19,52,101,16,85,109,22,73,5,81,33,
%U 67,64,50,86,81,137,76,66,149,111,99,157,81,106,163,2,52,173,129
%N a(n) is the least integer k such that for some iteration of sigma applied to k, one gets the n-th term of A002191, the list of possible values for the function sum of divisors.
%C The set union of this sequence is 1 U A007369.
%H Michel Marcus, <a href="/A309727/b309727.txt">Table of n, a(n) for n = 1..2503</a>
%F a(n) = 2 when A002191(n) is in A007497.
%F a(n) = 5 when A002191(n) is in A051572.
%F a(n) = 16 when A002191(n) is in A257349.
%e 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.
%o (PARI) list(lim) = select(n->n<=lim, Set(vector(lim\=1, n, sigma(n))));
%o 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;}
%Y Cf. A000203, A002191, A007369, A007497, A051572, A257349.
%Y A257670 is a better version for this sequence.
%K nonn
%O 1,2
%A _Michel Marcus_, Oct 14 2019