On 8/26/18 12:48 PM, Dennis Lee Bieber wrote: >> The sequence is defined by: >> >> For 1 <= n <= 3, a(n) = n; thereafter, a(2n) = a(n) + a(n+1), a(2n-1) = a(n) >> + a(n-2). >> > Confusing explanation -- do you really mean that for n>=4 you are > returning TWO values? If so, it is not a strict function. I'd also write it > as
I think they intend that a(n) is defined for n being an integer (or maybe just the Natural Numbers, since it isn't defined for values below 1) The two provided definitions provide the recursive definition for even and odd values. I am not sure what 'fractal' property this sequence has that he wants to display. -- https://mail.python.org/mailman/listinfo/python-list