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.

A309896 Generalized Fibonacci numbers. Square array read by ascending antidiagonals. F(n,k) for n >= 0 and k >= 0.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 3, 3, 1, 0, 1, 1, 4, 4, 5, 1, 0, 1, 1, 5, 5, 9, 8, 1, 0, 1, 1, 6, 6, 14, 14, 13, 1, 0, 1, 1, 7, 7, 20, 20, 28, 21, 1, 0, 1, 1, 8, 8, 27, 27, 48, 47, 34, 1, 0, 1, 1, 9, 9, 35, 35, 75, 75, 89, 55, 1, 0
Offset: 0

Views

Author

Peter Luschny, Aug 21 2019

Keywords

Examples

			Array starts:
[0] 1, 0, 0,  0,  0,  0,   0,   0,    0,    0,    0,    0, ...
[1] 1, 1, 1,  1,  1,  1,   1,   1,    1,    1,    1,    1, ...
[2] 1, 1, 2,  3,  5,  8,  13,  21,   34,   55,   89,  144, ...
[3] 1, 1, 3,  4,  9, 14,  28,  47,   89,  155,  286,  507, ...
[4] 1, 1, 4,  5, 14, 20,  48,  75,  165,  274,  571,  988, ...
[5] 1, 1, 5,  6, 20, 27,  75, 110,  275,  429, 1001, 1637, ...
[6] 1, 1, 6,  7, 27, 35, 110, 154,  429,  637, 1638, 2548, ...
[7] 1, 1, 7,  8, 35, 44, 154, 208,  637,  910, 2548, 3808, ...
[8] 1, 1, 8,  9, 44, 54, 208, 273,  910, 1260, 3808, 5508, ...
[9] 1, 1, 9, 10, 54, 65, 273, 350, 1260, 1700, 5508, 7752, ...
		

Crossrefs

Cf. A000007 (n=0), A000012 (n=1), A000045 (n=2), A006053 (n=3), A188021 (n=4), A231181 (n=5).

Programs

  • SageMath
    @cached_function
    def F(n, k):
        if k <  0: return 0
        if k == 0: return 1
        a = sum((-1)^j*binomial(n-1-j,j  )*F(n,k-1-2*j) for j in (0..(n-1)/2))
        b = sum((-1)^j*binomial(n-1-j,j+1)*F(n,k-2-2*j) for j in (0..(n-2)/2))
        return a + b
    print([F(n-k, k) for n in (0..11) for k in (0..n)])

Formula

F(n, k) = Sum_{j=0..(n-1)/2} (-1)^j*binomial(n-1-j,j)*F(n, k-1-2*j) + Sum_{j=0..(n-2)/2} (-1)^j*binomial(n-1-j, j+1)*F(n, k-2-2*j) for k > 0; F(n, 0) = 1 and F(n, k) = 0 if k < 0.