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.

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

This page as a plain text file.
%I A307116 #27 Jan 05 2020 07:19:16
%S A307116 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,
%T A307116 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,
%U A307116 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
%N A307116 A special version of Pascal's triangle where only Fibonacci numbers are permitted.
%C A307116 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.
%C A307116 A307069(k) is the row number of the first instance of the k-th Fibonacci number.
%H A307116 Seiichi Manyama, <a href="/A307116/b307116.txt">Rows n = 0..139, flattened</a>
%H A307116 Daniel Suteu, <a href="/A307116/a307116.png">Visual representation of the first 3000 rows</a>
%e A307116 The first few rows are as follows:
%e A307116   row 0:            1
%e A307116   row 1:           1 1
%e A307116   row 2:          1 2 1
%e A307116   row 3:         1 3 3 1
%e A307116   row 4:        1 1 1 1 1
%e A307116   row 5:       1 2 2 2 2 1
%e A307116   row 6:      1 3 1 1 1 3 1
%e A307116   row 7:     1 1 1 2 2 1 1 1
%e A307116   row 8:    1 2 2 3 1 3 2 2 1
%e A307116   row 9:   1 3 1 5 1 1 5 1 3 1
%t A307116 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 *)
%o A307116 (PARI) isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8));
%o A307116 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
%Y A307116 Cf. A000045, A307069.
%K A307116 nonn,tabl
%O A307116 0,5
%A A307116 _Elliott Line_, Mar 25 2019