%I #11 Oct 24 2023 03:21:50
%S 2,1,3,5,9,4,23,6,8,10,40,7,22,30,11,15,67,19,49,13,38,42,43,14,12,56,
%T 21,46,48,18,58,16,41,68,37,20,89,57,60,55,76,63,151,78,107,96,98,17,
%U 61,65,69,71,24,103,87,64,80,74,44,83,59,92,101,94,72,91,185,142,104,45
%N Index of the occurrence of n in A094339.
%p A094339 := proc(nmax) local a,n,sprev,i; a := [2] ; while nops(a) < nmax do sprev := add(i,i=a) ; n := 1 ; while sprev mod n <> 0 or n in a do n := n+1 ; od ; a := [op(a),n] ; od ; RETURN(a) ; end: a094339 := A094339(300) : n := 1 : while member(n,a094339,'w') do printf("%d, ",w) ; n := n+1 ; od : # _R. J. Mathar_, Apr 30 2007
%t nmax = 70; s = {2};
%t Do[AppendTo[s, Min[Select[Divisors[Total[s]], !MemberQ[s, #] &]]], {t, 2, 3 nmax}];
%t a[n_] := FirstPosition[s, n][[1]];
%t Table[a[n], {n, 1, nmax}] (* _Jean-François Alcover_, Oct 24 2023, after _Ivan Neretin_ in A094339 *)
%Y Cf. A094339, A094340.
%K nonn
%O 1,1
%A _Amarnath Murthy_, May 17 2004
%E Corrected and extended by _R. J. Mathar_, Apr 30 2007