Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Challenge: Simple algorithm for continuing series of integers

by blokhead (Monsignor)
on Oct 19, 2008 at 22:07 UTC ( [id://718098]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        [[0, 1, 1, 2, 3],       8],
    
  2. or download this
    #!/usr/bin/perl
    
    ...
      
     sub d { return $_[0]->{d}; }
    }
    
  3. or download this
    for my $t (@tests) {
        my @list = @{$t->[0]};
    ...
            print "??\n";
        }
    }
    
  4. or download this
    1 : identified as a(n) = 1 : next = 1
    1 1 : identified as a(n) = 1 : next = 1
    ...
    1 2 3 1 : identified as a(n) = 5*a(n-1) + -7*a(n-2) : next = -16
    1 3 5 : identified as a(n) = a(n-1) + 2 : next = 7
    2 4 6 : identified as a(n) = a(n-1) + 2 : next = 8
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-24 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found