Talk:Fibonacci n-step number sequences

From Rosetta Code

Lucas sequence redirect

I can't remember how to do a redirect. Could someone create and redirect Lucas sequence to this task, thanks. --Paddy3118 05:55, 25 May 2012 (UTC)

Got it for you. --Mwn3d 13:17, 25 May 2012 (UTC)
Ta! --Paddy3118 18:48, 25 May 2012 (UTC)

Naming of sequences

octonacci vs. octanacci

(spelling). The term octonacci seems to be a misspelling. It should be octanacci. The misspelling in the OEIS database entry A104415 is (most likely) being changed as I typeth (as it was just edited for correction by me). -- Gerard Schildberger 17:20, 25 May 2012 (UTC)

Hi Gerard, I read it the other way round. From greek prefixes, if we have tri-pod and octo-pod and we have tribonacci and not tribanacci, then surely we need octonacci as well. Google fight shows that there is some confusion but even here, the octonacci term seems to 'win'. --Paddy3118 18:43, 25 May 2012 (UTC)
I wouldn't sweat it. This reference shows both oct, octa and octo in use!? --Paddy3118 18:48, 25 May 2012 (UTC)
Yeah, in my REXX calculator, I accept both names. OEIS uses octanacci (with a misspelled octoancci reference that points to the octanacci sequence), and Wolfram MathWorld ™ doesn't mention either one. It's like the word hexadecimal --- it's wrong (mixing Greek with Latin), but it's too late to change it now. The common usage is so ingrained that everybody uses it and knows what it means. I suspect it will be with octo & octa. -- Gerard Schildberger 19:09, 25 May 2012 (UTC)
This just in ... the OEIS editors corrected the "misspelled/inconsistant" word (if only to be consistant with the other uses of the octanacci words, but they mentioned that both terms appear to be correct. That's good enough for me. -- Gerard Schildberger 19:14, 25 May 2012 (UTC)
Yay! I get a kick when I have a paw in something getting fixed at a site like OEIS. --Paddy3118 19:26, 25 May 2012 (UTC)

undecanacci numbers

this is the name of Fibonacci 11-step numbers. -- Gerard Schildberger 17:20, 25 May 2012 (UTC)

dodecanacci numbers

this is the name of Fibonacci 12-step numbers. -- Gerard Schildberger 17:20, 25 May 2012 (UTC)

task clarification

In the first part of the task description:

1. Write a function to generate Fibonacci n-step number sequences given its initial values and assuming the number of initial values determines how many previous values are summed to make the next number of the series.

(italics were added by me).

Now then, do you want us to assume the initial values for any given sequence are already known (assummed), or are we (or the requestor) to supply the initial values, and then from the counting of those values, assume that's what Fibonacci sequence is wanted?

I assummed by the verb tense given that the sequence is already known and has its initial values (but can be overridden by the requestor), but from the other verb tense determines, it appears you want us (or the requestor) to specify the initial values.

I took the later approach and had the requestor specify the initial values, and from that, deduced which Fibonacci sequence the requestor wanted. -- Gerard Schildberger 22:59, 25 May 2012 (UTC)

Hi Gerard, the idea was to describe what I did in the Python :-)
That is to create a function/class/... that you first call with only the necessary initial values of a series and get back something that will generate members of the particular series defined by the initial values (the number and order of them as well as their particular values). --Paddy3118 03:08, 26 May 2012 (UTC)

Base case 0

When I learned the Fibonacci sequence, we always used the base case [0, 1] (i.e. k=0 is 0, k=1 is 1), then it follows: 0 1 1 2 3 5 8... So the [0, 1] base case is one place "before" the [1, 1] base case that other people think of. Wikipedia defines F_0 = 0 and F_1 = 1, so this is really an issue of whether to start the sequence at k=0 or k=1. I always thought that [0, 1] was more elegant.

Looking at the other sequences here, the 0 also works. For n = 3, [0, 1, 1] produces the same sequence (with the additional 0 at the beginning). For n = 4, [0, 1, 1, 2] produces the same sequence, and so on. --Spoon! 01:38, 26 May 2012 (UTC)

This reference, (pdf) gives the zero too but I had found the was I reported earlier and just stuck with it. If you were to just make a note of the change in 'base' at the head of any example using this alternative then it should not be a problem. --Paddy3118 03:21, 26 May 2012 (UTC)

Racket function fib-n?

Hi Soegaard, the Racket function fib-n does not fit the task description (part 1); although fib-list does. Unfortunately you seem to have used fib-n for some of the output which means that with only a slight change you can make it fit the task description. --Paddy3118 (talk) 15:21, 28 April 2013 (UTC)

Hi Paddy,
I changed the test to display the whole table.

Ta! --Paddy3118 (talk) 17:58, 28 April 2013 (UTC)