[seqfan] Re: Code

Sean A. Irvine sairvin at gmail.com
Thu Jun 22 05:37:07 CEST 2017


Hi Peter,

I don't know much about Mathematica, but it is usually fairly easy to find
online specifications of various bits for the language.  So for example see,

http://reference.wolfram.com/language/ref/Table.html.en

In this case, it is constructing a table of 10 elements, where each element
is computed by substitution a value of n into the expression.

Having said this, I do wish that a lot more of the programs in the OEIS
were clearer about what they were doing.  I like the ones which are clear
enough that they can be easily translated into any other programming
language.

Sean.


On 22 June 2017 at 15:16, Peter Lawrence <peterl95124 at sbcglobal.net> wrote:

> Hans,
>          As I am not familiar with Mathematica (I’m just a C/C++
> programmer),
> would it be too much to ask for an explanation of this formula,
> in other words not a proof of its correctness, but rather the details
> of how it computes, what algorithm is being specified here ?
> Are F(n) and F(n+1) inputs, and if so then what is the output, F(n+2) ?
>
> Thanks,
> Peter Lawrence.
>
>
> > On Jun 21, 2017, at 3:51 PM, seqfan-request at list.seqfan.eu wrote:
> >
> > Message: 17
> > Date: Wed, 21 Jun 2017 15:32:01 -0400
> > From: Hans Havermann <gladhobo at bell.net <mailto:gladhobo at bell.net>>
> > To: Sequence Fanatics Discussion list <seqfan at list.seqfan.eu <mailto:
> seqfan at list.seqfan.eu>>
> > Subject: [seqfan] Code
> > Message-ID: <C6CC6D76-FE75-4251-ACCC-61CCD0F6C652 at bell.net <mailto:
> C6CC6D76-FE75-4251-ACCC-61CCD0F6C652 at bell.net>>
> > Content-Type: text/plain; charset=us-ascii
> >
> > I presume that the inclusion of code in sequences is to be able to
> generate/verify/extend that sequence. Simpler and faster is better.
> Browsing the OEIS today I chanced upon this Mathematica code for Fibonacci
> numbers < https://oeis.org/A000045 <https://oeis.org/A000045> >:
> >
> > Table[Fibonacci[n]^5 - Fibonacci[1 + n] + 3 Fibonacci[n]^4 Fibonacci[1 +
> n] + Fibonacci[n]^3 Fibonacci[1 + n]^2 - 3 Fibonacci[n]^2 Fibonacci[1 +
> n]^3 - Fibonacci[n] Fibonacci[1 + n]^4 + Fibonacci[1 + n]^5, {n, 1, 10}]
> >
> > It's an interesting Fibonacci identity worthy perhaps of mention in the
> comments (if it isn't already there) but I'm not sure it ought to be where
> it is.
>
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>



More information about the SeqFan mailing list