Suzanne Set

Author

Eric W. Weisstein
December 30, 2004

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

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

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

Code

DigitSum[d_]:=Plus@@IntegerDigits[d]
PrimeList[d_]:=Flatten[Table[#1,{#2}]&@@@FactorInteger[d]]

SuzanneQ[n_,x_Integer?PrimeQ]:=False
SuzanneQ[n_,x_Integer?Positive]:=Mod[DigitSum[x],n]==0&&Mod[Plus@@(DigitSum/@PrimeList[x]),n]==0

Tables

Select[Range[20],SuzanneQ[1,#]&]

A018252

Select[Range[100],SuzanneQ[2,#]&]

Select[Range[200],SuzanneQ[3,#]&]