Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Numerically generate the perl sequence 1, 11, 111, ....

by blazar (Canon)
on Oct 14, 2008 at 18:40 UTC ( #717065=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Numerically generate the perl sequence 1, 11, 111, ....
in thread Generate the perl sequence 1, 11, 111, ....

Unless we can make the "whatever" version intuit such an algebraic relationship, in which case it would just be:
1,11,111,111 ... *
Just how far we could/should drive the intuition of the series operator is an interesting question.

I personally believe that however appealing at first sight, it would be kinda too much! When the layman, or even the Physics doctor asks: "which is the next term after 1,1,2,3,5,8,13,21?" expecting his audience either to recocgnize the Fibonacci numbers or not to know about them, and then to blow their minds with explanations about them... the mathematician would answer: "42" In fact, given any number one can devise a rule by which the latter can be obtained from the former ones. Of course, one would want an "easy" rule. But the problem is that that "easy" is just as much as psychologically appealing as difficult to be mathematically defined.

Thus, the question is either devoid of any sensible answer, or one should restrict himself a priori to some predefined class of rules, e.g. to linear recurrencies, and to establish an unambiguous relationship of simplicity within that class, to allow one to be picked up automatically.

Alternatively, or better, in addition, one may allow other classes to be specified by means of a suitable adverb, e.g.

1,11,111,1111, ... * :polyinomially

But do we really want to make such a big subset of Perl 6 into what that seems a generic Mathematics tool?

--
If you can't understand the incipit, then please check the IPB Campaign.


Comment on Re^3: Numerically generate the perl sequence 1, 11, 111, ....
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://717065]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-12-28 10:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (180 votes), past polls