login
a(n) = smallest prime dividing n-th nonsquarefree positive integer.
3

%I #16 Jun 02 2017 11:47:55

%S 2,2,3,2,2,2,2,2,5,3,2,2,2,2,2,3,2,7,2,2,2,2,2,3,2,2,2,3,2,2,3,2,2,2,

%T 2,2,2,3,2,2,2,2,2,3,2,11,2,5,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,2,2,13,3,

%U 2,5,2,2,2,2,3,2,2,2,2,2,3,2,2,2,2,2,3,2,2,2,2,2,2,3,2,5,2,2,2,2,2,3,2,2,2

%N a(n) = smallest prime dividing n-th nonsquarefree positive integer.

%H Harvey P. Dale, <a href="/A117183/b117183.txt">Table of n, a(n) for n = 1..1000</a>

%F A020639(A013929(n)).

%e 12, the 4th nonsquarefree positive integer, is 2^2 * 3. 2 is the smallest prime dividing 12. So a(4) = 2.

%p with(numtheory): a:=proc(n) if mobius(n)=0 then op(1,factorset(n)) fi end: seq(a(n),n=1..345); # _Emeric Deutsch_

%t Needs["NumberTheory`NumberTheoryFunctions`"]; FactorInteger[ # ][[1, 1]] & /@ Select[ Range@252, !SquareFreeQ@# &] (* _Robert G. Wilson v_ *)

%t FactorInteger[#][[1,1]]&/@DeleteCases[Range[300],_?SquareFreeQ] (* _Harvey P. Dale_, Jun 02 2017 *)

%Y Cf. A115074, A115090, A013929, A020639.

%K nonn

%O 1,1

%A _Leroy Quet_, Mar 01 2006

%E More terms from _Emeric Deutsch_ and _Robert G. Wilson v_, Mar 06 2006