A307116 A special version of Pascal's triangle where only Fibonacci numbers are permitted.
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
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
Links
- Seiichi Manyama, Rows n = 0..139, flattened
- Daniel Suteu, Visual representation of the first 3000 rows
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
Comments