%I #6 Mar 31 2015 00:20:58
%S 1,2,5,4,13,6,23,9,19,13,43,12,59,22,27,19,79,19,97,22,41,35,113,24,
%T 89,43,59,33,157,31,173,41,77,61,101,36,211,71,95,45,239,46,257,59,71,
%U 86,281,48,209,73,127,73,331,62,167,67,143,111,373,60,389,121
%N a(n) is the index, in the A256440 triangle, of the first row where n is the n-th term of the row.
%C The integers for which a(n)=n are 1, 2, 4, 6, 12, 24, 36, 48, 60, ... : A004394.
%C The integers for which a(n)=n-1 are 3, 8, 18, 30, 72, ...: A247022 (except 3).
%e Triangle A256440 starts:
%e 1;
%e 1, 2;
%e 1, 3, 2;
%e 1, 3, 2, 4;
%e 1, 5, 3, 2, 4;
%e 1, 5, 3, 2, 4, 6;
%e 1, 7, 5, 3, 2, 4, 6;
%e ...
%e a(1)=1 because row 1 is the first row where 1 is the 1st term of the row.
%e a(2)=2 because row 2 is the first row where 2 is the 2nd term of the row.
%e a(3)=5 because row 5 is the first row where 3 is the 3rd term of the row.
%o (PARI) posf(n) = {i = n; stop = 0; while (! stop, v = vector(i, k, sigma(k)/k); w = vecsort(v, , 1); pos = posv(n, w); if (pos == n, stop=1, i++);); i;}
%Y Cf. A004394, A247022, A256440.
%K nonn
%O 1,2
%A _Michel Marcus_, Mar 30 2015