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

%I #27 Jan 05 2020 07:19:16

%S 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 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 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 A special version of Pascal's triangle where only Fibonacci numbers are permitted.

%C 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 A307069(k) is the row number of the first instance of the k-th Fibonacci number.

%H Seiichi Manyama, <a href="/A307116/b307116.txt">Rows n = 0..139, flattened</a>

%H Daniel Suteu, <a href="/A307116/a307116.png">Visual representation of the first 3000 rows</a>

%e The first few rows are as follows:

%e row 0: 1

%e row 1: 1 1

%e row 2: 1 2 1

%e row 3: 1 3 3 1

%e row 4: 1 1 1 1 1

%e row 5: 1 2 2 2 2 1

%e row 6: 1 3 1 1 1 3 1

%e row 7: 1 1 1 2 2 1 1 1

%e row 8: 1 2 2 3 1 3 2 2 1

%e row 9: 1 3 1 5 1 1 5 1 3 1

%t 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 (PARI) isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8));

%o 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 Cf. A000045, A307069.

%K nonn,tabl

%O 0,5

%A _Elliott Line_, Mar 25 2019