Post Reply 
(38G) PENTANACCI NUMBERS (OEIS A124313)
04-07-2015, 11:53 AM (This post was last modified: 06-15-2017 01:54 PM by Gene.)
Post: #1
(38G) PENTANACCI NUMBERS (OEIS A124313)
For positive integer input N the programme PENTANACCI returns the Nth Pentanacci Number, see:

http://oeis.org/A124313

The number is returned in Ans in Home view.

The matrix powering programme MPOW can be found here:

http://www.hpmuseum.org/forum/thread-3359.html

PENTANACCI

Ans-4►N:
[[1,1,1,1,1],
[1,0,0,0,0],
[0,1,0,0,0],
[0,0,1,0,0],
[0,0,0,1,0]]►M1:
N:
RUN MPOW:
Ans(1,4):

Or you might prefer this:

Ans-4►N:
MAKEMAT(I==1 OR I-1==J,5,5)►M1:
N:
RUN MPOW:
Ans(1,4):
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)