[math-fun] In https://twitter.com/wolframtap/status/522518755168243712 , profligate pleonast
NeilB tweeted three superfluous characters: (*primes*)d[n_,t_,k_]:=If[k<1,Boole[n<1],If[t>n,0,d[n-t,0,k-1]+d[n,1/2+t+Sqrt[2t+1/4],k]]];2Select[Range[99],2#+2==d[#,0,4]&]+1 Can you find them? —rwg
Eavesdropper Zack found a fourth! —rwg On Fri, Oct 17, 2014 at 11:07 AM, Bill Gosper <billgosper@gmail.com> wrote:
NeilB tweeted three superfluous characters:
(*primes*)d[n_,t_,k_]:=If[k<1,Boole[n<1],If[t>n,0,d[n-t,0,k-1]+d[n,1/2+t+Sqrt[2t+1/4],k]]];2Select[Range[99],2#+2==d[#,0,4]&]+1 Can you find them? —rwg
Here's a massively slower (and stranger) one that takes 29 secs to reach 29. Spoiler warning: It contains Zack's hack and my cheat (which I haven't test-tweeted): (*primes*)d[n_,t_,k_]:=If[k<1,Boole[n<1],If[t>n,0,d[n-t,0,k-1]+d[n,1/\2+t+√(2t+1/4),k]]];Select[Range@29 ,#^3+1==d[#-1,0,8]&] It speeds up > a thousandfold if you prepend "d[n, t, k] =" to the recursion step. The guy who came closest to figuring out how these work is Joshua Zucker, the ultimate counterexample to "Those who can, do; those who can't, teach." (This slogan also breaks down for Med School surgical procedures, replaced by "See one, do one, teach one.") --rwg If Wolfram had rather called this promotion Tweet A Terse Program, Homeland Security would be all over us. On Fri, Oct 17, 2014 at 2:21 PM, Bill Gosper <billgosper@gmail.com> wrote:
Eavesdropper Zack found a fourth! —rwg
On Fri, Oct 17, 2014 at 11:07 AM, Bill Gosper <billgosper@gmail.com> wrote:
NeilB tweeted three superfluous characters:
(*primes*)d[n_,t_,k_]:=If[k<1,Boole[n<1],If[t>n,0,d[n-t,0,k-1]+d[n,1/2+t+Sqrt[2t+1/4],k]]];2Select[Range[99],2#+2==d[#,0,4]&]+1 Can you find them? —rwg
On Fri, Oct 17, 2014 at 11:07 AM, Bill Gosper <billgosper@gmail.com> wrote:
NeilB tweeted three superfluous characters:
(*primes*)d[n_,t_,k_]:=If[k<1,Boole[n<1],If[t>n,0,d[n-t,0,k-1]+d[n,1/2+t+Sqrt[2t+1/4],k]]];2Select[Range[99],2#+2==d[#,0,4]&]+1 Can you find them? —rwg
SPOILER: Zack Chroman found Range@99. I replaced Sqrt[] with √(). Zack: "That is so cheating." So I finally broke down with my all-time maiden tweet https://pbs.twimg.com/media/B8T3djoIYAEO6Y-.png which crashed in flames when wolframtap botched the π character! Retrying, https://twitter.com/wolframtap/status/559917026748407808/photo/1 This hasn't yet shown up at http://wolframtap.tumblr.com/archive/2015/1 but neither has anything subsequent (27 Jan). NeilB's primes generator never showed up, presumably for lack of eye candy. The candy collector must now judge my latest: pic.twitter.com/MVKeGDqiBG <http://t.co/MVKeGDqiBG> . Who is this idiot tweeting a trivial heptagram? Wolfram is right--nobody wants to look at code when there are pictures. Let's display the code too small to read. --rwg For an incredibly cheap thrill, Colorize[JuliaSetPlot[I]] .
participants (1)
-
Bill Gosper