

A105574


a(1) = 2; for n > 1, a(n) is the prime whose index is the least prime factor of n.


2



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, 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, 5, 3, 277, 3, 283, 3, 5, 3, 11, 3, 331, 3, 5, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Previous name: a(n) is the mth prime number, where m is the smallest prime factor of n, a(1) = 2.
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
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


LINKS

Antti Karttunen, Table of n, a(n) for n = 1..16384


FORMULA

a(n) = A000040(A020639(n)).  Antti Karttunen, Nov 10 2018
a(2*n) = 3.  Muniru A Asiru, Nov 10 2018


EXAMPLE

The smallest prime factor of 5 is 5. Hence a(5) is the 5th prime, which is 11.
The smallest prime factor of 6 is 2. Therefore a(6) = 3.


MATHEMATICA

Table[Prime[FactorInteger[n][[1, 1]]], {n, 2, 70}]


PROG

(PARI) g(n) = for(x=2, n, print1(prime(sdiv(x))", "))
sdiv(n) = { local(x); x=ifactor(n); return(x[1]) } \\ The smallest prime divisor of n
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.
(PARI)
A020639(n) = if(1==n, n, factor(n)[1, 1]);
A105574(n) = prime(A020639(n)); \\ Antti Karttunen, Nov 10 2018
(GAP) P:=Filtered([1..350], IsPrime);; a:=List(List([1..Length(P)], Factors), i>P[i[1]]); # Muniru A Asiru, Nov 10 2018
(Magma) [2] cat [NthPrime(Min(PrimeFactors(n))):n in[2..70]]; // Vincenzo Librandi, Dec 09 2018


CROSSREFS

Cf. A000040, A020639, A105562.
Sequence in context: A211245 A107473 A337585 * A105562 A323704 A272202
Adjacent sequences: A105571 A105572 A105573 * A105575 A105576 A105577


KEYWORD

nonn,less


AUTHOR

Cino Hilliard, May 03 2005


EXTENSIONS

Edited by Stefan Steinerberger, Jul 25 2007
Term a(1) = 2 prepended and offset corrected by Antti Karttunen, Nov 10 2018
New name from Michel Marcus, Dec 09 2018


STATUS

approved



