A217032 Minimum number of steps to reach n! starting from 1 and using the operations of multiplication, addition, or subtraction.
0, 1, 3, 4, 6, 6, 7, 8, 8, 9, 9, 10, 11, 11, 12, 12, 12, 13, 13
Offset: 1
Examples
The entry for 9! is 8 because of the straight-line program {1, 2, 3, 9, 8, 72, 70, 7!, 9!}; subtraction is essential to getting 9! in 8 steps. The entry for 10! is 9 because of the straight-line program {1, 2, 3, 5, 7, 12, 144, 6!, 7!, 10!}, which does not use subtraction.
Links
- Peter Borwein and Joe Hobart, The extraordinary power of division in straight line programs, American Mathematical Monthly 119:7 (2012), pp. 584-592.
- P. Koiran, Valiant's model and the cost of computing integers, Comput. Complex. 13 (2004), pp. 131-146. [DOI]
- Ed Mertensotto, post about enumerating all sequences of 12 steps [broken link]
- Ed Mertensotto, Tomas G. Rokicki, Gil Dogon, Search, digest of 25 messages in AlZimmermannsProgrammingContests Yahoo group, Mar 19 - Apr 23, 2013.
- Michael Shub and Steve Smale, On the intractability of Hilbert's Nullstellensatz and an algebraic version of "NP = P", Duke Mathematical Journal 81:1 (1995), pp. 47-54. [DOI]
- Stan Wagon, Macalester Problem of the Week 1153
- Al Zimmermann, Al Zimmermann's Programming Contests: Factorials
- Index to sequences related to the complexity of n
Formula
Extensions
a(12) from Charles R Greathouse IV, Oct 04 2012
a(13)-a(19) from Ed Mertensotto, Mar 20 2013
Comments