Powerful Number

Author

Eric W. Weisstein
May 4, 2006

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumberTheory/PowerfulNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/PowerfulNumber.html.

©2006 Wolfram Research, Inc. except for portions noted otherwise

Code

PowerfulQ[1]:=True
PowerfulQ[n_Integer?Positive]:=Min[Last/@FactorInteger[n]]>1

Enumeration

Select[Range[100],PowerfulQ]

(p=Select[Range[10^7],PowerfulQ]);//Timing

Table[Count[p,_?(#≤10^n&)],{n,10^7}]

(p=Select[Range[10^8],PowerfulQ]);//Timing

Table[Count[p,_?(#≤10^n&)],{n,0,9}]

Powerful Pairs

(pp=Select[Partition[Select[Range[10^7],PowerfulQ],2,1],Subtract@@#==-1&])//Timing

(pp=Select[Partition[Select[Range[10^8],PowerfulQ],2,1],Subtract@@#==-1&])//Timing

Transpose[pp]

Powerful Triples

Select[Partition[Select[Range[10^6],PowerfulQ],3,1],Subtract@@#[[{3,1}]]==2&]//Timing

Select[Partition[Select[Range[10^7],PowerfulQ],3,1],Subtract@@#[[{3,1}]]==2&]//Timing

Select[Partition[Select[Range[10^8],PowerfulQ],3,1],Subtract@@#[[{3,1}]]==2&]//Timing

Sum of Reciprocals

Total[1`20/Select[Range[10^7],PowerfulQ]]//Timing

Total[1`20/Select[Range[10^8],PowerfulQ]]//Timing

N[((Zeta[2]Zeta[3])/(Zeta[6])),10]