OFFSET
1,6
COMMENTS
For n>1, a((n+1)!) = n is the first occurrence of n in the sequence. This function depends only on the prime signature of n. - Franklin T. Adams-Watters, Dec 19 2006
For integer n and prime p not dividing n, a(n*p) = a(n) + 1. - Max Alekseyev, Apr 23 2010
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Unordered Factorization.
EXAMPLE
a(6)=2 since 6 may be factored into distinct parts as {{2,3},{6}}, so the largest number of factors possible is 2.
a(8)=2 since 8 may be factored into distinct parts as {{8},{2,4}}, so the largest numbers of factors possible is 2.
PROG
(PARI) { a(n, m=1) = if(n>m, 1 + vecmax( apply( x->if(x>m, a(n/x, x)), divisors(n) ))) } \\ Max Alekseyev, Jul 16 2009
(PARI) { aopt(n) = local(f, t); f=factor(n)[, 2]; t=select(x->x>1, f); a(prod(j=1, #t, prime(j)^t[j])) + #f - #t } /* optimized version */ \\ Max Alekseyev, Apr 23 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Jul 19 2003
EXTENSIONS
More terms from Max Alekseyev, Apr 23 2010
STATUS
approved