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.

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

This page as a plain text file.
%I A354265 #11 Nov 22 2022 09:40:39
%S A354265 2,3,1,4,4,3,5,7,7,4,6,10,11,11,7,7,13,15,18,18,11,8,16,19,25,29,29,
%T A354265 18,9,19,23,32,40,47,47,29,10,22,27,39,51,65,76,76,47,11,25,31,46,62,
%U A354265 83,105,123,123,76,12,28,35,53,73,101,134,170,199,199,123
%N A354265 Array read by ascending antidiagonals for n >= 0 and k >= 0. Generalized Lucas numbers, L(n, k) = (psi^(k - 1)*(phi + n) - phi^(k - 1)*(psi + n)), where phi = (1 + sqrt(5))/2 and psi = (1 - sqrt(5))/2.
%C A354265 The definition declares the Lucas numbers for all integers n and k. It gives the classical Lucas numbers as L(0, n) = Lucas(n), where Lucas(n) = A000032(n) is extended in the usual way for negative n.
%H A354265 Peter Luschny, <a href="https://www.luschny.de/math/seq/oeis/FibonacciFunction.html">The Fibonacci Function</a>.
%F A354265 Functional equation extends Cassini's theorem:
%F A354265 L(n, k) = (-1)^k*L(1 - n, -k - 2).
%F A354265 L(n, k) = n*Lucas(k + 1) + Lucas(k).
%F A354265 L(n, k) = L(n, k-1) + L(n, k-2).
%F A354265 L(n, k) = i^k*sec(c)*(n*cos(c*(k + 1)) - i*cos(c*k)), where c = Pi/2 + i*arccsch(2), for all n, k in Z.
%F A354265 Using the generalized Fibonacci numbers F(n, k) = A352744(n, k),
%F A354265 L(n, k) = F(n, k+1) + F(n, k) + F(n, k-1) + F(n, k-2).
%e A354265 Array starts:
%e A354265 [0]  2,  1,  3,  4,   7,  11,  18,  29,  47,   76, ... A000032
%e A354265 [1]  3,  4,  7, 11,  18,  29,  47,  76, 123,  199, ... A000032 (shifted)
%e A354265 [2]  4,  7, 11, 18,  29,  47,  76, 123, 199,  322, ... A000032 (shifted)
%e A354265 [3]  5, 10, 15, 25,  40,  65, 105, 170, 275,  445, ... A022088
%e A354265 [4]  6, 13, 19, 32,  51,  83, 134, 217, 351,  568, ... A022388
%e A354265 [5]  7, 16, 23, 39,  62, 101, 163, 264, 427,  691, ... A190995
%e A354265 [6]  8, 19, 27, 46,  73, 119, 192, 311, 503,  814, ... A206420
%e A354265 [7]  9, 22, 31, 53,  84, 137, 221, 358, 579,  937, ... A206609
%e A354265 [8] 10, 25, 35, 60,  95, 155, 250, 405, 655, 1060, ...
%e A354265 [9] 11, 28, 39, 67, 106, 173, 279, 452, 731, 1183, ...
%p A354265 phi := (1 + sqrt(5))/2: psi := (1 - sqrt(5))/2:
%p A354265 L := (n, k) -> phi^(k+1)*(n - psi) + psi^(k+1)*(n - phi):
%p A354265 seq(seq(simplify(L(n-k, k)), k = 0..n), n = 0..10);
%t A354265 L[n_, k_] := With[{c = Pi/2 + I*ArcCsch[2]},
%t A354265              I^k Sec[c] (n Cos[c (k + 1)] - I Cos[c k]) ];
%t A354265 Table[Simplify[L[n, k]], {n, 0, 6}, {k, 0, 6}] // TableForm
%t A354265 (* Alternative: *)
%t A354265 L[n_, k_] := n*LucasL[k + 1] + LucasL[k];
%t A354265 Table[Simplify[L[n, k]], {n, 0, 6}, {k, 0, 6}] // TableForm
%o A354265 (Julia)
%o A354265 const FibMem = Dict{Int,Tuple{BigInt,BigInt}}()
%o A354265 function FibRec(n::Int)
%o A354265     get!(FibMem, n) do
%o A354265         n == 0 && return (BigInt(0), BigInt(1))
%o A354265         a, b = FibRec(div(n, 2))
%o A354265         c = a * (b * 2 - a)
%o A354265         d = a * a + b * b
%o A354265         iseven(n) ? (c, d) : (d, c + d)
%o A354265     end
%o A354265 end
%o A354265 function Lucas(n, k)
%o A354265     k ==  0 && return BigInt(n + 2)
%o A354265     k == -1 && return BigInt(2 * n - 1)
%o A354265     k <   0 && return (-1)^k * Lucas(1 - n, -k - 2)
%o A354265     a, b = FibRec(k)
%o A354265     c, d = FibRec(k - 1)
%o A354265     n * (2 * a + b) + 2 * c + d
%o A354265 end
%o A354265 for n in -6:6
%o A354265     println([Lucas(n, k) for k in -6:6])
%o A354265 end
%Y A354265 Cf. A000032, A000204, A022088, A022388, A190995, A206420, A206609.
%Y A354265 Cf. A352744.
%K A354265 nonn,tabl
%O A354265 0,1
%A A354265 _Peter Luschny_, May 29 2022