Wednesday, January 12, 2011

Search for Snakes...! :)

Hi pa,

Thanks to my friends Hemanth, Gundeep, Anand & Amit, me got to know recently that 2011, apart from being a prime, is also the sum of 11 consecutive primes..!

Here's the problem formulation I managed to somehow type...which i have tried to make as generic as possible...
(except for the operation being Summation...!! It could be Product, or anything you can think of ! Feel Free to play around, explore & note down any beautiful patterns u may stumble upon...! :) )

Please click on the below picture to read the text's just my silly analogies..but hope it's clear enough..?! :)

I decided to scribble some code to do this...& I discussed with many of my dear friends like Pavan, Prasidhya, et al., about my intuition as to how to go about it...I am Always indebted to them, fer NEVER EVER getting irritated with me-moron, but always smilingly listening to what I had to say ( or scribble & doodle, as always..! :) )...!

But somehow, i could never bring myself to actually write any piece of code---i was in that 'stuck' state...of utter emptiness, like always..! :)

I would struggle to articulate & explain one approach to my dears, & my MIND would soon fill up with counter-arguments for it, & soo much noise that I soon decided to shut-up & stop disturbing them with my stupid blabberings, and instead, leave the problem...(to simmer...! :))...

Post-Lunch....alone....and a hunch...!! ;) :)

And one fine day...(not so fine...since i was all lonely fer lunch...!), I was walking back from lunch, looking up @ the lovely clouds floating in the azure skies....& ...YES..! :)

i suddenly felt the ideas rushing into me...!! :)

i hurried up to my floor...took a cup of Tea...& feverishly typed a baby Java program...(not meant to be a model of ways..but, instead, just a transliteration of what i 'heard/felt' ...should/can be discover this LONG, coiled, camouflaged SNAKE...nestled in the infinite ROPE of Numbers...!!

And except for an initial "ArrayIndexOfOutOfBoundsException" once, my baby program ran without any hassles...& showed me exactly what i wanted to see !  Phew !! :)

Have decided to share the complete code fer YOU, if you are interested, so that you can improve/modify it & do your own experiments...! :)

Please visit the below link to see the source-code (scantily/crazily documented...on the 'spur of the moment' :) )...u can hv a good laugh @ HOW it is JUST a plain translation of my childish idea...! :)

Click on the below image to see a sample run... :)

Hope you too begin 'seeing' some snakes & worms & patterns in numbers then...!

Take care...and keep L(i/o)ving...!! :-O :)

Lots of Love & Best wishes,

The moron in 'rags'
Planet Earth
One of my all-time inspiring quotes...(yet again..!!)
Computers are useless; they can ONLY give you answers.
:- Pablo Picasso
(Hope the lit'l child below makes you smile..?? Courtesy  of dear Mr.Charles M. Schulz (Peanuts) :) My state was/is JUSST Like this...Hmmm...!!)


No comments:

Post a Comment

Pleeze do give me YOUr (in)valuable feedback...!
Thanks a lot in deed.. :)