OFFSET
2,1
EXAMPLE
The only prime divisor of 4 is 2, so a(4) = 2.
The prime divisors of 6 are 2 and 3; in the sequence to that point (2,3,2,5), there are two 2's and 1 3, we take the less common one, so a(6) = 3.
The prime divisors of 12 are 2 and 3; these occur equally often in the sequence to that point, so we take the smaller one; a(12)=2.
PROG
(PARI) al(n)={local(ns=vector(primepi(n)), r=vector(n-1), ps);
for(k=1, n-1,
ps=factor(k+1)[, 1]~;
r[k]=ps[1];
for(j=2, #ps, if(ns[primepi(ps[j])]<ns[primepi(r[k])], r[k]=ps[j]));
ns[primepi(r[k])]++);
r}
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Oct 18 2011
STATUS
approved