This site is supported by donations to The OEIS Foundation.

User talk:R. J. Cano

From OeisWiki
Jump to: navigation, search

The following is a PARI-GP routine:

A217626_firstTerms(u)=/*apply(fromdigits,*/(apply(x->(-1*matrix(u,u,i,j,i<=j)*x~)~,vector(u!-1,i, Vec( numtoperm(u,i):vecsmall ) - Vec( numtoperm(u,i-1):vecsmall ) )))/*)*/;

The story told over there is that A217626 can be computed without actually performing divisions. All what you need is to treat permutations as column vectors, subtract them, and multiply-from-left the result by the non-strict upper triangular matrix. Then, either you can get u!-1 vectors such that when read as decimal numbers what you get are the first terms of A217626, or you simply obtain these last by removing above the c-style comments.