cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

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.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 20 2003

Keywords

Comments

The m-th term in a Fibonacci-type sequence is smallest for the Fibonacci sequence itself. a(Fibonacci(n)) = n (which corresponds to taking s_1 = s_2 = 1). This gives an upper bound a(t) <= log_phi(sqrt(5)*t), roughly. Denes asks: How small can a(n) be and when do small values occur?
These sequences are called slow Fibonacci walks by Chung et al. - Michel Marcus, Apr 04 2019

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

A252230 Triangular array T read by rows: for j = k+1..2*k, k >=1, T(j,k) = least number of iterations of (h,i) -> (i,h-i) needed to take (k,j) to (k',j') satisfying k' <= j'.

Original entry on oeis.org

1, 2, 1, 2, 3, 1, 2, 2, 3, 1, 2, 2, 4, 3, 1, 2, 2, 2, 3, 3, 1, 2, 2, 2, 4, 3, 3, 1, 2, 2, 2, 2, 5, 3, 3, 1, 2, 2, 2, 2, 4, 3, 3, 3, 1, 2, 2, 2, 2, 2, 4, 3, 3, 3, 1, 2, 2, 2, 2, 2, 4, 5, 3, 3, 3, 1, 2, 2, 2, 2, 2, 2, 4, 3, 3, 3, 3, 1, 2, 2, 2, 2, 2, 2, 4, 6
Offset: 1

Views

Author

Clark Kimberling, Jan 09 2015

Keywords

Comments

Max(row n) = A088858(n). Let F = A000045 (Fibonacci numbers). Then T(j,k) is the least h such that one of the following holds: h is odd and F(h+2)/F(h+1) <= j/k, or h is even and F(h+2)/F(h+1) >= j/k.

Examples

			First 11 rows:
1
2 1
2 3 1
2 2 3 1
2 2 4 3 1
2 2 2 3 3 1
2 2 2 4 3 3 1
2 2 2 2 5 3 3 1
2 2 2 2 4 3 3 3 1
2 2 2 2 2 4 3 3 3 1
2 2 2 2 2 2 4 3 3 3 3 1
Note, for example, that the numbers in row 8 are T(8,9) to T(8,16); e.g., T(8,13) counts these 5 iterations:  (13,8) -> (8,5) -> (5,3) -> (3,2) -> (2,1) -> (1,1).
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Fibonacci[n]; h[j_, k_] := Select[Range[40], (OddQ[#] && f[# + 2]/f[# + 1]<= j/k) || (EvenQ[#] && f[# + 2]/f[# + 1] >= j/k) &, 1]; t[k_] := Flatten[Table[h[j, k], {j, k + 1, 2*k}]];
    TableForm[Table[t[k], {k, 1, 26}]] ; (* A252230 array *)
    Flatten[Table[h[j, k], {k, 1, 100}, {j, k + 1, 2*k}]] (* A252230 sequence *)
Showing 1-2 of 2 results.