Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Example program about A055881, _Joerg Arndt_, Dec 15 2012
- */
- v055881(n)= /* Compute the first n! terms of A055881 by counting in rising factorial base. */ { my( fc=vector(n) ); /* mixed radix numbers (rising factorial base) */ my( j=0 ); while ( 1, /* increment factorial number fc[]: */ j = 1; while ( fc[j] == j, fc[j]=0; j+=1; ); /* scan over nines */ if ( j==n, return() ); /* current is last */ fc[j] += 1; print1(" ", j ); /* A055881: position of rightmost change in fc[] */ print1(" ", fc); /* show factorial number */ print(); ); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement