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-1 of 1 results.

A307116 A special version of Pascal's triangle where only Fibonacci numbers are permitted.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 3, 1, 3, 2, 2, 1, 1, 3, 1, 5, 1, 1, 5, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 1, 1, 3, 1, 1, 1, 5, 1, 5, 1, 1, 1, 3, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1
Offset: 0

Views

Author

Elliott Line, Mar 25 2019

Keywords

Comments

If the sum of the two numbers above in the triangular array is not a Fibonacci number (A000045), then a 1 is put in its place.
A307069(k) is the row number of the first instance of the k-th Fibonacci number.

Examples

			The first few rows are as follows:
  row 0:            1
  row 1:           1 1
  row 2:          1 2 1
  row 3:         1 3 3 1
  row 4:        1 1 1 1 1
  row 5:       1 2 2 2 2 1
  row 6:      1 3 1 1 1 3 1
  row 7:     1 1 1 2 2 1 1 1
  row 8:    1 2 2 3 1 3 2 2 1
  row 9:   1 3 1 5 1 1 5 1 3 1
		

Crossrefs

Programs

  • Mathematica
    With[{s = Array[Fibonacci, 12]}, Nest[Append[#, Join[{1}, Map[Total[#] /. k_ /; FreeQ[s, k] -> 1 &, Partition[#[[-1]], 2, 1]], {1}]] &, {{1}}, 12]] // Flatten (* Michael De Vlieger, Mar 28 2019 *)
  • PARI
    isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8));
    rows(nn) = {v = [1]; print(v); if (nn == 1, return); v = [1, 1]; print(v); if (nn == 2, return); for (n=3, nn, w = vector(n); w[1] = v[1]; for (j=2, n-1, w[j] = v[j-1]+ v[j]; if (!isfib(w[j]), w[j] = 1);); w[n] = v[n-1]; print(w); v = w;);} \\ Michel Marcus, Mar 28 2019
Showing 1-1 of 1 results.