%I #43 Sep 08 2022 08:45:17
%S 2,3,5,3,11,3,17,3,5,3,31,3,41,3,5,3,59,3,67,3,5,3,83,3,11,3,5,3,109,
%T 3,127,3,5,3,11,3,157,3,5,3,179,3,191,3,5,3,211,3,17,3,5,3,241,3,11,3,
%U 5,3,277,3,283,3,5,3,11,3,331,3,5,3
%N a(1) = 2; for n > 1, a(n) is the prime whose index is the least prime factor of n.
%C Previous name: a(n) is the m-th prime number, where m is the smallest prime factor of n, a(1) = 2.
%C Given that the smallest prime factor of 6k + {-4, -3, -2, -1, 0, 1} is (2, 3, 2, p, 2, q) where p, q >= 5, p <> q, the sequence has from a(2) on the repeating pattern (3, 5, 3, prime(p), 3, prime(q)) of length 6, with prime(p), prime(q) >= prime(5) = 11 and prime(p) <> prime(q). - _Bernard Schott_, Dec 09 2018, edited by _M. F. Hasler_, Dec 10 2018
%C If n is in standard form and p is the smallest prime factor of n, then a(n) = prime(p) = A000040(p). - _Muniru A Asiru_, Jan 29 2019
%H Antti Karttunen, <a href="/A105574/b105574.txt">Table of n, a(n) for n = 1..16384</a>
%F a(n) = A000040(A020639(n)). - _Antti Karttunen_, Nov 10 2018
%F a(2*n) = 3. - _Muniru A Asiru_, Nov 10 2018
%e The smallest prime factor of 5 is 5. Hence a(5) is the 5th prime, which is 11.
%e The smallest prime factor of 6 is 2. Therefore a(6) = 3.
%t Table[Prime[FactorInteger[n][[1, 1]]], {n, 2, 70}]
%o (PARI) g(n) = for(x=2,n,print1(prime(sdiv(x))", "))
%o sdiv(n) = { local(x); x=ifactor(n); return(x[1]) } \\ The smallest prime divisor of n
%o ifactor(n,m=0) = { local(f,j,k,flist); flist=[]; f=Vec(factor(n,m)); for(j=1,length(f[1]), for(k = 1,f[2][j],flist = concat(flist,f[1][j]) ); ); return(flist) } \\ The vector of the integer factors of n with multiplicity.
%o (PARI)
%o A020639(n) = if(1==n, n, factor(n)[1, 1]);
%o A105574(n) = prime(A020639(n)); \\ _Antti Karttunen_, Nov 10 2018
%o (GAP) P:=Filtered([1..350],IsPrime);; a:=List(List([1..Length(P)],Factors),i->P[i[1]]); # _Muniru A Asiru_, Nov 10 2018
%o (Magma) [2] cat [NthPrime(Min(PrimeFactors(n))):n in[2..70]]; // _Vincenzo Librandi_, Dec 09 2018
%Y Cf. A000040, A020639, A105562.
%K nonn,less
%O 1,1
%A _Cino Hilliard_, May 03 2005
%E Edited by _Stefan Steinerberger_, Jul 25 2007
%E Term a(1) = 2 prepended and offset corrected by _Antti Karttunen_, Nov 10 2018
%E New name from _Michel Marcus_, Dec 09 2018