OFFSET
1,2
COMMENTS
Also a(n) = minimal 'freeness' of n with regard to squares, cubes, etc: All entries where a(n) = 2 are squarefree (or prime); Entries where a(n) = 3 are cubefree (and thus free of higher powers) but not squarefree, and so on. - _Carl R. White_, Jul 27 2009
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
FORMULA
If the prime factorization of n>1 is p_1^e_1 ... p_k^e_k, then a(n) = 1+max(e_1, ..., e_k).
a(n) = A051903(n) + 1. - _Ridouane Oudra_, Sep 10 2024
EXAMPLE
a(12) = 3 as the divisors of 12 are {1,2,3,4,6,12} and the maximal subsets in geometric progression are {1,2,4} and {3,6,12}.
a(16) = 5; the maximal set is {1,2,4,8,16}.
MAPLE
seq(max(0, seq(padic[ordp](n, p), p in numtheory[factorset](n))) + 1, n=1..100); # _Ridouane Oudra_, Sep 10 2024
MATHEMATICA
a[n_] := If[n==1, 1, Max@@Last/@FactorInteger[n]+1]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
_Amarnath Murthy_, Jan 09 2002
EXTENSIONS
Edited by _Dean Hickerson_, Jan 15 2002
STATUS
approved