A274006 Largest proper prime power divisor of n, or 1 if n is squarefree.
1, 1, 1, 4, 1, 1, 1, 8, 9, 1, 1, 4, 1, 1, 1, 16, 1, 9, 1, 4, 1, 1, 1, 8, 25, 1, 27, 4, 1, 1, 1, 32, 1, 1, 1, 9, 1, 1, 1, 8, 1, 1, 1, 4, 9, 1, 1, 16, 49, 25, 1, 4, 1, 27, 1, 8, 1, 1, 1, 4, 1, 1, 9, 64, 1, 1, 1, 4, 1, 1, 1, 9, 1, 1, 25, 4, 1, 1, 1, 16, 81, 1
Offset: 1
Keywords
Examples
36 = 2^2 * 3^2. 3^2 = 9 > 2^2 = 4, so a(36) = 9. 20 = 2^2 * 5, so 2^2 = 4 is the only proper prime power divisor of 20, thus a(20) = 4.
Links
- Franklin T. Adams-Watters, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A274006:=proc(n) local a, pe; a := 1; for pe in ifactors(n)[2] do if pe[2] > 1 then a:=max(a, pe[1]^pe[2]); end if; end do; a end proc: seq(A274006(n), n=1..100); # R. J. Mathar, Jun 02 2025
-
Mathematica
Table[s = Select[FactorInteger[n], #[[2]] > 1 &]; If[s == {}, 1, Max[#1^#2 & @@@ s]], {n, 100}] (* T. D. Noe, Jan 02 2012 *) Table[If[SquareFreeQ[n],1,Max[#[[1]]^#[[2]]&/@Select[FactorInteger[n],#[[2]]>1&]]],{n,90}] (* Harvey P. Dale, Feb 18 2025 *)
-
PARI
a(n) = my(fm=factor(n),r=1); for(k=1, #fm[,1], if(fm[k,2]!=1&&fm[k,1]^fm[k,2]>r, r=fm[k,1]^fm[k,2]));r
Comments