Hoax Number

Author

Eric W. Weisstein
March 4, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/HoaxNumber.nb.

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

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

Code

DigitSum[n_,b_:10]:=Plus@@IntegerDigits[n,b]

HoaxNumberQ[n_Integer]:=HoaxNumberQ[1,n]
HoaxNumberQ[k_,p_Integer?PrimeQ]:=False
HoaxNumberQ[k_,n_Integer]:=DigitSum[n]==Plus@@DigitSum/@First/@FactorInteger[n]/k

Hoax Numbers

(hoax=Select[Range[1000],HoaxNumberQ])//Timing

DigitSum/@hoax

Plot

<<Utilities`Plot`

Show[PixelPerfect[NaryPlot[Select[Range[10^4],HoaxNumberQ]]]]