OFFSET
1,1
COMMENTS
An n-slow Fibonacci walk is a Fibonacci-like sequence that needs a maximum number of steps, s (see A088527), to reach n, and w_(s+1) will be the next term of this sequence. See Chung et al. for further explanation.
LINKS
Fan Chung, Ron Graham, and Sam Spiro, Slow Fibonacci Walks, arXiv:1903.08274 [math.NT], 2019. See pp. 3-4.
PROG
(PARI) nbs(i, j, n) = {my(nb = 2, ij); until (j >= n, ij = i+j; i = j; j = ij; nb++); if (j==n, nb, -oo); }
dofib(i, j, nb) = {if (nb==2, return (j)); for (k=3, nb, ij = i + j; i = j; j = ij; ); return (j); }
s(n) = {my(nb = 2, k); for (i=1, n, for (j=1, n, k = nbs(i, j, n); if (k> nb, nb = k); ); ); nb; } \\ A088527
isdown(n) = {my(nb = s(n)); for (i=1, n, for (j=1, n, k = nbs(i, j, n); if (k == nb, w = dofib(i, j, nb+1); if (w == floor(n*((1+sqrt(5))/2)), return (1)); ); ); ); return (0); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Apr 04 2019
STATUS
approved