Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Another demonstrative program: An alternative sequencer for A055881.
- * R. J. Cano, Jan 7 2013
- */
- U=3; \\ Upperbound.
- default(echo,1);
- output01(input01)={
- my(
- siZe1=#input01,
- siZe2=(input01[siZe1]+1)!,
- ans=vector(siZe2,k,input01[(k-1)%siZe1+1])
- );
- ans[siZe2]++;
- ans;
- };
- \\ print("\n\n**Please always remember pre-allocate enough mem for your task in the command line invokation.**\n\n");
- v1=[1];
- for(k=0,U,if(k>0,v2=output01(v1);v1=v2);print(v1));
- quit();
- /*
- * Acknowledgements: To M.F. Hasler and Joerg Arndt.
- *
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement