OFFSET
1,4
COMMENTS
Note that more than one stone can be moved during a single move.
A121924 is the analogous sequence if only one stone can be transferred between piles of equal size.
A011371 is the analogous sequence if all stones must be transferred between piles of equal size (i.e., the number of stones in each pile must be a power of two).
EXAMPLE
For n = 7, an 8-move sequence is:
(1 1 1 1 1 1 1) -> (2 1 1 1 1 1) -> (2 2 1 1 1) -> (3 1 1 1 1) -> (3 2 1 1) -> (3 2 2) -> (3 3 1) -> (5, 1, 1) -> (5 2).
PROG
(Python)
def A292729(n):
s_in = set([(1, )*n])
count=-1
while len(s_in) > 0:
s_out = set()
for s in s_in:
last = -1 ; idx = 0
while (idx+1) < len(s):
h = s[idx]
if h!=last and s[idx+1]==h:
for q in range(1, h+1):
lst = list(s[:idx]) + list(s[idx+2:])
lst += [2*h] if h==q else [ h-q, h+q]
t = tuple(sorted(lst))
if not t in s_out:
s_out.add(t)
last = s[idx] ; idx += 1
count += 1
s_in = s_out
return count
# Bert Dobbelaere, Jul 14 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Kagey, Sep 22 2017
EXTENSIONS
a(35)-a(60) from Bert Dobbelaere, Jul 14 2019
STATUS
approved