A088527 Define a Fibonacci-type sequence to be one of the form s(1) = s_1 >= 1, s(2) = s_2 >= 1, s(n+2) = s(n+1) + s(n); then a(n) = maximal m such that n is the m-th term in some Fibonacci-type sequence.
2, 3, 4, 4, 5, 4, 5, 6, 5, 5, 6, 5, 7, 6, 5, 6, 6, 7, 6, 6, 8, 6, 7, 6, 6, 7, 6, 7, 8, 6, 7, 6, 7, 9, 6, 7, 8, 7, 7, 6, 7, 8, 7, 7, 8, 7, 9, 7, 7, 8, 7, 7, 8, 7, 10, 7, 7, 8, 7, 9, 8, 7, 8, 7, 7, 8, 7, 9, 8, 7, 8, 7, 9, 8, 7, 10, 8, 7, 8, 7, 9, 8, 7, 8, 8, 9, 8, 7, 11
Offset: 1
Links
- Fan Chung, Ron Graham, Sam Spiro, Slow Fibonacci Walks, arXiv:1903.08274 [math.NT], 2019. See s(n) pp. 1 and 2.
- T. Denes, Problem 413, Discrete Math. 272 (2003), 302 (but there are several errors in the table given there).
Crossrefs
See A088858 for another version.
Programs
-
Mathematica
max = 12; s[n_] := (1/2)*((3*s1 - s2)*Fibonacci[n] + (s2 - s1)*LucasL[n]); a[n_] := Reap[ Do[If[s[m] == n, Sow[m]], {m, 1, max}, {s1, 1, max}, {s2, 1, max}]][[2, 1]] // Max; Table[a[n], {n, 1, 89}] (* Jean-François Alcover, Jan 15 2013 *)
-
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);} a(n) = {my(nb = 2, k); for (i=1, n, for (j=1, n, k = nbs(i, j, n); if (k> nb, nb = k););); nb;} \\ Michel Marcus, Apr 04 2019
Extensions
Corrected and extended by Don Reble, Nov 21 2003
Comments