-   Aliquot Sequences (
-   -   A Wolfram Alpha widget toy (

mshelikoff 2014-12-11 04:37

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 2015-05-15 07:40

Another Wolfram Alpha toy for unitary aliquot sequences
NestWhileList[Fold[#1 #2& , #[[1]]^#[[2]]+1& /@ Factor[#][[1]]]-#& , 1482, Unequal[##,1] && Unequal[##]&, {1,Infinity}]

can be used at Wolfram Alpha to generate the unitary aliquot sequence for the unitary sociable cycle starting with 1482. That messy code uses the formula for k=1 at [URL][/URL] . I had to modify the mathematica code given at mathworld to meet the limitations of Wolfram Alpha. These aren't the aliquot sequences that folks in this forum usually play with. They're based on Sloane's A034448 at [URL][/URL] . Any lengthy computation leads to no results, and I have no idea if a different computation method would work faster, but Wolfram Alpha is popular among undergrads, so maybe it will see some use.

The widget toy with a Matrix Form wrapper and even terser code is at [URL][/URL] .

All times are UTC. The time now is 02:14.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.