RSA Number

Author

Eric W. Weisstein
July 2, 2012

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PrimeNumbers/RSANumber.nb.

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

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

Examples

RSA-100

RSA[100]

IntegerDigits[RSA[100]]//Length

RSAFactors[100]

Times@@%

RSA-150

RSA[150]

IntegerDigits[RSA[150]]//Length

Length/@IntegerDigits/@RSAFactors[150]

RSA-200

NumberForm[RSA[200],DigitBlock->10,NumberSeparator->" "]

IntegerDigits[RSA[200]]//Length

Length/@IntegerDigits/@RSAFactors[200]

NumberForm[#,DigitBlock->10,NumberSeparator->" "]&/@RSAFactors[200]

RSA-576

NumberForm[RSA[576],DigitBlock->10,NumberSeparator->" "]

Length[IntegerDigits[RSA[576],#]]&/@{2,10}

NumberForm[#,DigitBlock->10,NumberSeparator->" "]&/@RSAFactors[576]

Length/@IntegerDigits/@RSAFactors[576]

RSA-640

NumberForm[RSA[640],DigitBlock->10,NumberSeparator->" "]

Length[IntegerDigits[RSA[640],#]]&/@{2,10}

NumberForm[#,DigitBlock->10,NumberSeparator->" "]&/@RSAFactors[640]

Length/@IntegerDigits/@RSAFactors[640]

RSA-704

NumberForm[RSA[704],DigitBlock->10,NumberSeparator->" "]

Length[IntegerDigits[RSA[704],#]]&/@{2,10}

NumberForm[#,DigitBlock->10,NumberSeparator->" "]&/@RSAFactors[704]

IntegerLength/@RSAFactors[704]

RSA-768

NumberForm[RSA[768],DigitBlock->10,NumberSeparator->" "]

Length[IntegerDigits[RSA[768],#]]&/@{2,10}

NumberForm[#,DigitBlock->10,NumberSeparator->" "]&/@RSAFactors[768]

IntegerLength/@RSAFactors[768]

Check

{#,Length[IntegerDigits[RSA[#]]]}&/@(#[[1,1]]&/@First/@DownValues[RSA])

factored=#[[1]] /. RSAFactors[x_]:>x /. HoldPattern:>Identity &/@DownValues[RSAFactors]

And@@RSAFactorsCheck/@factored

Map[PrimeQ,RSAFactors/@factored,{2}]