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.

A352744 Array read by ascending antidiagonals. Generalized Fibonacci numbers F(n, k) = (psi^k*(phi - n) - phi^k*(psi - n)) / (phi - psi) where phi = (1 + sqrt(5))/2 and psi = (1 - sqrt(5))/2. F(n, k) for n >= 0 and k >= 0.

This page as a plain text file.
%I A352744 #57 May 30 2022 08:40:54
%S A352744 1,1,0,1,1,1,1,2,2,1,1,3,3,3,2,1,4,4,5,5,3,1,5,5,7,8,8,5,1,6,6,9,11,
%T A352744 13,13,8,1,7,7,11,14,18,21,21,13,1,8,8,13,17,23,29,34,34,21,1,9,9,15,
%U A352744 20,28,37,47,55,55,34,1,10,10,17,23,33,45,60,76,89,89,55
%N A352744 Array read by ascending antidiagonals. Generalized Fibonacci numbers F(n, k) = (psi^k*(phi - n) - phi^k*(psi - n)) / (phi - psi) where phi = (1 + sqrt(5))/2 and psi = (1 - sqrt(5))/2. F(n, k) for n >= 0 and k >= 0.
%C A352744 The definition declares the Fibonacci numbers for all integers n and k. An alternative version is A353595.
%C A352744 The identity F(n, k) = (-1)^k*F(1 - n, -k) holds for all integers n, k. Proof:
%C A352744      F(n, k)*(2+phi) = (phi^k*(n*phi + 1) - (-phi)^(-k)*((n-1)*phi - 1))
%C A352744                      = (-1)^k*(phi^(-k)*((1-n)*phi+1) - (-phi)^k*(-n*phi-1))
%C A352744                      = (-1)^k*F(1-n, -k)*(2+phi).
%C A352744 This identity can be seen as an extension of Cassini's theorem of 1680 and of an identity given by Graham, Knuth and Patashnik in 'Concrete Mathematics' (6.106 and 6.107). The beginning of the full array with arguments in Z x Z can be found in the linked note.
%C A352744 The enumeration is the result of the simple form of the chosen definition. The classical positive Fibonacci numbers starting with 1, 1, 2, 3,... are in row n = 1 with offset 0. The nonnegative Fibonacci numbers starting 0, 1, 1, 2, 3,... are in row 0 with offset 1. They prolong towards -infinity with an index shifted by 1 compared to the enumeration used by Knuth. A characteristic of our enumeration is F(n, 0) = 1 for all integer n.
%C A352744 Fibonacci numbers vanish only for (n,k) in {(-1,2), (0,1), (1,-1), (2,-2)}. The zeros correspond to the identities (phi + 1)*psi^2 = (psi + 1)*phi^2, psi*phi = phi*psi, (phi - 1)*phi = (psi - 1)*psi and (phi - 2)*phi^2 = (psi - 2)*psi^2.
%C A352744 For divisibility properties see A352747.
%C A352744 For any fixed k, the sequence F(n, k) is a linear function of n. In other words, an arithmetic progression. This implies that F(n+1, k) = 2*F(n, k) - F(n-1, k) for all n in Z. Special case of this is Fibonacci(n+1) = 2 *Fibonacci(n) - Fibonacci(n-2). - _Michael Somos_, May 08 2022
%D A352744 R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, sec. 6.6.
%D A352744 Donald Ervin Knuth, The Art of Computer Programming, Third Edition, Vol. 1, Fundamental Algorithms. Chapter 1.2.8 Fibonacci Numbers. Addison-Wesley, Reading, MA, 1997.
%H A352744 Alexander Bogomolny, <a href="https://www.cut-the-knot.org/arithmetic/algebra/CassinisIdentity.shtml">Cassini's Identity</a>.
%H A352744 Edsger W. Dijkstra, <a href="https://www.cs.utexas.edu/users/EWD/transcriptions/EWD06xx/EWD654.html">In honour of Fibonacci</a>, in: F. L. Bauer, M. Broy, & E. W. Dijkstra (editors), Program Construction, 1979, Lecture Notes in Computer Science, Vol. 69.
%H A352744 Peter Luschny, <a href="https://www.luschny.de/math/seq/oeis/FibonacciFunction.html">The Fibonacci Function</a>.
%F A352744 F(n, k) = F(n, k-1) + F(n, k-2) for k >= 2, otherwise 1, n for k = 0, 1.
%F A352744 F(n, k) = (n-1)*f(k-1) + f(k) where f(n) = A000045(n+1), the Fibonacci numbers starting with f(0) = 1.
%F A352744 F(n, k) = ((phi^k*(n*phi + 1) - (-phi)^(-k)*((n - 1)*phi - 1)))/(2 + phi).
%F A352744 F(n, k) = [x^k] (1 + (n - 1)*x)/(1 - x - x^2) for k >= 0.
%F A352744 F(k, n) = [x^k] (F(0, n) + F(0, n-1)*x)/(1 - x)^2 for k >= 0.
%F A352744 F(n, k) = (k!/sqrt(5))*[x^k] ((n-psi)*exp(phi*x) - (n-phi)*exp(psi*x)) for k >= 0.
%F A352744 F(n, k) - F(n-1, k) = sign(k)^(n-1)*f(k) for all n, k in Z, where A000045 is extended to negative integers by f(-n) = (-1)^(n-1)*f(n) (CMath 6.107). - _Peter Luschny_, May 09 2022
%F A352744 F(n, k) = 2*((n-1)*i*sin(k*c) + sin((k+1)*c))/(i^k*sqrt(5)) where c = Pi/2 - i*arcsinh(1/2), for all n, k in Z. Based on a remark from Bill Gosper. - _Peter Luschny_, May 10 2022
%e A352744 Array starts:
%e A352744 n\k 0, 1,  2,  3,  4,  5,  6,   7,   8,   9, ...
%e A352744 ---------------------------------------------------------
%e A352744 [0] 1, 0,  1,  1,  2,  3,  5,   8,  13,  21, ... A212804
%e A352744 [1] 1, 1,  2,  3,  5,  8, 13,  21,  34,  55, ... A000045 (shifted once)
%e A352744 [2] 1, 2,  3,  5,  8, 13, 21,  34,  55,  89, ... A000045 (shifted twice)
%e A352744 [3] 1, 3,  4,  7, 11, 18, 29,  47,  76, 123, ... A000032 (shifted once)
%e A352744 [4] 1, 4,  5,  9, 14, 23, 37,  60,  97, 157, ... A000285
%e A352744 [5] 1, 5,  6, 11, 17, 28, 45,  73, 118, 191, ... A022095
%e A352744 [6] 1, 6,  7, 13, 20, 33, 53,  86, 139, 225, ... A022096
%e A352744 [7] 1, 7,  8, 15, 23, 38, 61,  99, 160, 259, ... A022097
%e A352744 [8] 1, 8,  9, 17, 26, 43, 69, 112, 181, 293, ... A022098
%e A352744 [9] 1, 9, 10, 19, 29, 48, 77, 125, 202, 327, ... A022099
%p A352744 f := n -> combinat:-fibonacci(n + 1): F := (n, k) -> (n-1)*f(k-1) + f(k):
%p A352744 seq(seq(F(n-k, k), k = 0..n), n = 0..9);
%p A352744 # The next implementation is for illustration only but is not recommended
%p A352744 # as it relies on floating point arithmetic.
%p A352744 phi := (1 + sqrt(5))/2: psi := (1 - sqrt(5))/2:
%p A352744 F := (n, k) -> (psi^k*(phi - n) - phi^k*(psi - n)) / (phi - psi):
%p A352744 for n from -6 to 6 do lprint(seq(simplify(F(n, k)), k = -6..6)) od;
%t A352744 Table[LinearRecurrence[{1, 1}, {1, n}, 10], {n, 0, 9}] // TableForm
%t A352744 F[ n_, k_] := (MatrixPower[{{0, 1}, {1, 1}}, k].{{1}, {n}})[[1, 1]]; (* _Michael Somos_, May 08 2022 *)
%t A352744 c := Pi/2 - I*ArcSinh[1/2]; (* Based on a remark from Bill Gosper. *)
%t A352744 F[n_, k_] := 2 (I (n-1) Sin[k c] + Sin[(k+1) c]) / (I^k Sqrt[5]);
%t A352744 Table[Simplify[F[n, k]], {n, -6, 6}, {k, -6, 6}] // TableForm (* _Peter Luschny_, May 10 2022 *)
%o A352744 (Julia) # Time complexity is O(lg n).
%o A352744 function fibrec(n::Int)
%o A352744     n == 0 && return (BigInt(0), BigInt(1))
%o A352744     a, b = fibrec(div(n, 2))
%o A352744     c = a * (b * 2 - a)
%o A352744     d = a * a + b * b
%o A352744     iseven(n) ? (c, d) : (d, c + d)
%o A352744 end
%o A352744 function Fibonacci(n::Int, k::Int)
%o A352744     k == 0 && return BigInt(1)
%o A352744     k  < 0 && return (-1)^k*Fibonacci(1 - n, -k)
%o A352744     a, b = fibrec(k - 1)
%o A352744     a + b*n
%o A352744 end
%o A352744 for n in -6:6
%o A352744     println([Fibonacci(n, k) for k in -6:6])
%o A352744 end
%o A352744 (PARI) F(n, k) = ([0, 1; 1, 1]^k*[1; n])[1, 1]
%o A352744 (PARI) {F(n, k) = n*fibonacci(k) + fibonacci(k-1)}; /* _Michael Somos_, May 08 2022 */
%Y A352744 Rows: A212804, A000045, A000032, A000285, A022095, A022096, A022097, A022098, A022099.
%Y A352744 Columns: A000012, A001477, A000027, A005408, A016789, A016885, A004770.
%Y A352744 Diagonals: A088209 (main), A007502, A066982 (antidiagonal sums).
%Y A352744 Cf. A352747, A353595 (alternative version), A354265 (generalized Lucas numbers).
%Y A352744 Similar arrays based on the Catalan and the Bell numbers are A352680 and A352682.
%K A352744 nonn,tabl,easy
%O A352744 0,8
%A A352744 _Peter Luschny_, Apr 01 2022