View Single Post
Old 2014-12-11, 04:37   #1
mshelikoff's Avatar
"Marc Shelikoff"
Dec 2014
Cambridge, MA

3×5 Posts
Default A Wolfram Alpha widget toy

Hi aliquot sequence folks.

Yesterday I began to use:

NestWhileList[DivisorSigma[1,#] - #&, 138, Unequal[##,1] && Unequal[##]&, {1,Infinity}]

as WolframAlpha/Mathematica code that generates a complete aliquot sequence for 138 or any other (moderately easy) number including cycles and sequences that end in cycles. I've seen similar things published before but not for WolframAlpha. I added a "MatrixForm" wrapper and created a widget at:

Like everything else at WolframAlpha, the computation just stops with no results if it hasn't finished after a few seconds, so the free widget is useless for the work that many of you guys deal with, and of course there's no database lookup or anything like that. But it's easy to plop the widget into web pages as javascript, and it can do some nifty things well like confirming 50-digit sociable cycles.

I think Stephen Wolfram wants me to start calling this stuff "Wolfram Language" instead of WolframAlpha/Mathematica code, but Wolfram Alpha (or at least the free version) contains such a limited subset of Mathematica that it sure doesn't seem like one language to me.

Similar terse code might be useful and perhaps fast for anyone running a full-and-recent version of Mathematica. Using Wolfram's computers through the pro-version of their Programming Cloud might also speed things up if anyone has access to those types of toys.
mshelikoff is offline   Reply With Quote