|
|
A307069
|
|
Given a special version of Pascal's triangle where only Fibonacci numbers are permitted, a(n) is the row number in which the n-th Fibonacci number first appears.
|
|
2
|
|
|
0, 0, 2, 3, 9, 50, 51, 70, 71, 133, 134, 135, 136, 2543, 2544
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Consider a version of Pascal's Triangle: a triangular array with a single 1 on row 0, with numbers below equal to the sum of the two numbers above it if and only if that sum appears in the Fibonacci sequence A000045. If the sum does not appear in A000045, a 1 is put in its place.
So the first few rows would be 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
...
a(n) is the row number in which the n-th Fibonacci number first appears in this triangular array.
|
|
LINKS
|
|
|
MATHEMATICA
|
Block[{s = Array[Fibonacci, 20], t}, t = Nest[Append[#1, (PadLeft[#1[[-1]], #2] + PadRight[#1[[-1]], #2]) /. k_Integer /; FreeQ[s, k] -> 1] & @@ {#, Length@ # + 1} &, {{1}}, 10^4]; -1 + TakeWhile[Map[FirstPosition[t, #][[1]] &, s], IntegerQ]] (* Michael De Vlieger, Mar 24 2019 *)
|
|
PROG
|
(PARI) isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8));
lista(nn) = {print1(0, ", ", 0, ", "); v = [1, 1]; nextf = 3; for (n=2, nn, w = vector(n+1); w[1] = v[1]; for (j=2, n, w[j] = v[j-1]+ v[j]; if (!isfib(w[j]), w[j] = 1)); w[n+1] = v[n]; sw = vecsort(w, , 8); if (vecsearch(sw, fibonacci(nextf)), print1(n, ", "); nextf++); v = w; ); } \\ Michel Marcus, Mar 22 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|