HP Forums
(38G) PENTANACCI NUMBERS (OEIS A124313) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (38G) PENTANACCI NUMBERS (OEIS A124313) (/thread-3576.html)



(38G) PENTANACCI NUMBERS (OEIS A124313) - Gerald H - 04-07-2015 11:53 AM

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):