Wolfram Research

Function Repository Resource:

QuasiPerfectNumberQ

Source Notebook

Test whether an integer is a quasiperfect number

Contributed by: Sander Huisman

ResourceFunction["QuasiPerfectNumberQ"][n]

tests whether n is a quasiperfect number.

Details

n must be an integer.
The test will be done on Abs[n] if n is negative.
Quasiperfect numbers, if they exist, will be >1035, have at least 7 distinct prime factors and are odd squares.
Quasiperfect returns either True or False.
No quasiperfect number is known.

Examples

Basic Examples (2) 

Try a number:

In[1]:=
ResourceFunction["QuasiPerfectNumberQ"][16]
Out[1]=

Negative numbers are tested as if they are positive:

In[2]:=
ResourceFunction["QuasiPerfectNumberQ"][-10]
Out[2]=

Neat Examples (2) 

Try out the numbers 1 through 107:

In[3]:=
Position[Table[ResourceFunction["QuasiPerfectNumberQ"][n], {n, 10^7}],
   0, {1}] // AbsoluteTiming
Out[3]=

Test the first 10,000 odd square numbers after 1036:

In[4]:=
Reap[Do[If[ResourceFunction["QuasiPerfectNumberQ"][n^2], Sow[n^2]], {n, 10^18, 10^18 + 10000, 2}]][[2]]
Out[4]=

Resource History

License Information