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.

Showing 1-8 of 8 results.

A352747 Array read by ascending antidiagonals. A(n, k) = F(k, n) mod n for n >= 1 and k >= 0, where F(n, k) = A352744(n, k) are the Fibonacci numbers, A(0, k) = 1 for k >= 0.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 2, 0, 1, 0, 1, 3, 1, 2, 0, 0, 1, 5, 3, 0, 1, 1, 0, 1, 1, 1, 3, 3, 0, 0, 0, 1, 5, 0, 3, 3, 2, 2, 1, 0, 1, 3, 2, 6, 5, 3, 1, 1, 0, 0, 1, 4, 1, 7, 5, 1, 3, 0, 0, 1, 0, 1, 0, 9, 8, 4, 4, 3, 3, 3, 2, 0, 0, 1, 5, 1, 4, 6, 1, 3, 5, 3, 2, 1, 1, 0, 1
Offset: 0

Views

Author

Peter Luschny, Apr 08 2022

Keywords

Comments

This array aims the study of the divisibility properties of the Fibonacci numbers A352744. The identity F(n, k) = (-1)^k*F(1 - n, -k) from A352744 shows that negative indices do not add to the divisibility properties of F(n, k).
All rows A(n, .) are pure periodic sequences. The length of the periods is given by (1, A270313). For n > 0 the length of the period of row A(n, .) is <= n.
The period length is 1 for n in (1, A023172) and n for n in (1, A074215), as observed by Robert Israel in A270313. In particular, if n is a power of 2 or a prime (A174090), then the period length is n.
The indices of the zero-free rows are in A353280. A zero-free row A(n, .) means that n will not divide F(k, n) whatever value k takes. For that it is sufficient to check that period(A(n, .)) is zero-free.
If period(A(n, .)) = [k | 0 <= k < n] we call n a 'Fibonacci friend'. In other words, in this case F(k, n) mod n = k for 0 <= k < n. A Fibonacci friend does not have to be prime (since 1 is a Fibonacci friend), but if it is prime then it is congruent to {1, 4} mod 5 (A045468), and all such primes are Fibonacci friends.
To say that n is a Fibonacci friend is equivalent to saying that A(n, n) = 0 and that n divides F(n, n). Fibonacci friends are the indices of the zeros in A002752.
Integers n > 0 that divide Sum{k=0..n-1} (F(k, n) mod n) are congruent to {0, 1, 3, 5} mod 6 (A301729).

Examples

			Array starts (periods are indicated with () ):
[n\k] 0   1   2   3   4  5  6   7   8   9  10  11  12
----------------------------------------------------------
[ 0] (1), 1,  1,  1,  1, 1, 1,  1,  1,  1,  1,  1,  1, ...
[ 1] (0), 0,  0,  0,  0, 0, 0,  0,  0,  0,  0,  0,  0, ...
[ 2] (1,  0), 1,  0,  1, 0, 1,  0,  1,  0,  1,  0,  1, ...
[ 3] (1,  0,  2), 1,  0, 2, 1,  0,  2,  1,  0,  2,  1, ...
[ 4] (2,  1,  0,  3), 2, 1, 0,  3,  2,  1,  0,  3,  2, ...
[ 5] (3), 3,  3,  3,  3, 3, 3,  3,  3,  3,  3,  3,  3, ...
[ 6] (5,  1,  3), 5,  1, 3, 5,  1,  3,  5,  1,  3,  5, ...
[ 7] (1,  0,  6,  5,  4, 3, 2), 1,  0,  6,  5,  4,  3, ...
[ 8] (5,  2,  7,  4,  1, 6, 3,  0), 5,  2,  7,  4,  1, ...
[ 9] (3,  1,  8,  6,  4, 2, 0,  7,  5), 3,  1,  8,  6, ...
[10] (4,  9), 4,  9,  4, 9, 4,  9,  4,  9,  4,  9,  4, ...
[11] (0,  1,  2,  3,  4, 5, 6,  7,  8,  9, 10), 0,  1, ...
[12] (5), 5,  5,  5,  5, 5, 5,  5,  5,  5,  5,  5,  5, ...
		

Crossrefs

Programs

  • Maple
    f := n -> combinat:-fibonacci(n + 1):
    F := proc(n, k) option remember; (n-1)*f(k-1) + f(k) end:
    A := (n, k) -> ifelse(n = 0, 1, modp(F(k, n), n)):
    for n from 0 to 12 do seq(A(n, k), k = 0..10) od;
  • Mathematica
    F[n_, k_] := (n - 1)*Fibonacci[k] + Fibonacci[k + 1];
    A[n_, k_] := If[n == 0, 1, Mod[F[k, n], n]];
    Table[A[n, k], {n, 0, 12}, {k, 0, 10}] // TableForm
  • SageMath
    def F(n, k): return (n - 1)*fibonacci(k) + fibonacci(k + 1)
    def A(n,k): return mod(F(k, n), n)
    for n in range(13): print([A(n,k) for k in range(13)])

Formula

A(n, 0) = A(n, n) = A002752(n).
Clearly 0 <= A(n, k) < n for all k and n > 0.

A353280 n is a term if n = 0 or n does not divide F(n, k) for all k >= 0, where F(n, k) are the Fibonacci numbers A352744.

Original entry on oeis.org

0, 5, 6, 10, 12, 15, 18, 20, 24, 25, 30, 35, 36, 40, 42, 45, 48, 50, 54, 55, 56, 60, 65, 66, 70, 72, 75, 78, 80, 84, 85, 90, 91, 95, 96, 100, 102, 105, 108, 110, 112, 114, 115, 120, 125, 126, 130, 132, 135, 138, 140, 144, 145, 150, 153, 155, 156, 160, 162, 165
Offset: 1

Views

Author

Peter Luschny, Apr 09 2022

Keywords

Comments

n is a term if 0 is not a term of the sequence A352747(n, .). Since A352747(n, .) is for all n a pure periodic sequence, it is sufficient to require that 0 is not a term of period(A352747(n, .)). Since the length of the period is <= n, the condition can be checked in a finite number of steps.
The multiples of 5 and 6 (A093509) are a subsequence. The terms not of this form start 56, 91, 112, ..., and are in A353281.

Examples

			period(A352747(6, .)) = (5, 1, 3) is zero-free, therefore 6 is a term of a.
period(A352747(7, .)) = (1, 0, 6, 5, 4, 3, 2), thus 7 is not a term of a.
		

Crossrefs

a = A093509 union A353281.

Programs

  • Maple
    f := n -> combinat:-fibonacci(n): F := (n, k) -> (n-1)*f(k) + f(k+1):
    df := n -> denom(f(n)/n) - 1: period := n -> [seq(modp(F(k,n), n), k = 0..df(n))]:
    isA353280 := n -> n = 0 or not member(0, period(n)):
    select(isA353280, [$(0..166)]);
  • SageMath
    def F(n, k): return (n - 1)*fibonacci(k) + fibonacci(k + 1)
    def df(n): return denominator(fibonacci(n) / n)
    def period(n): return (Integer(n).divides(F(k, n)) for k in range(df(n)))
    def isA353280(n): return n == 0 or not any([k == True for k in period(n)])
    def A353280List(upto): return [n for n in range(upto + 1) if isA353280(n)]
    print(A353280List(165))

A066982 a(n) = Lucas(n+1) - (n+1).

Original entry on oeis.org

1, 1, 3, 6, 12, 22, 39, 67, 113, 188, 310, 508, 829, 1349, 2191, 3554, 5760, 9330, 15107, 24455, 39581, 64056, 103658, 167736, 271417, 439177, 710619, 1149822, 1860468, 3010318, 4870815, 7881163, 12752009, 20633204, 33385246, 54018484, 87403765, 141422285
Offset: 1

Views

Author

Benoit Cloitre, Jan 27 2002

Keywords

Comments

From Gus Wiseman, Feb 12 2019: (Start)
Also the number of ways to split an (n + 1)-cycle into nonempty connected subgraphs with no singletons. For example, the a(1) = 1 through a(5) = 12 partitions are:
{{12}} {{123}} {{1234}} {{12345}} {{123456}}
{{12}{34}} {{12}{345}} {{12}{3456}}
{{14}{23}} {{123}{45}} {{123}{456}}
{{125}{34}} {{1234}{56}}
{{145}{23}} {{1236}{45}}
{{15}{234}} {{1256}{34}}
{{126}{345}}
{{1456}{23}}
{{156}{234}}
{{16}{2345}}
{{12}{34}{56}}
{{16}{23}{45}}
Also the number of non-singleton subsets of {1, ..., (n + 1)} with no cyclically successive elements (cyclically successive means 1 succeeds n + 1). For example, the a(1) = 1 through a(5) = 12 subsets are:
{} {} {} {} {}
{1,3} {1,3} {1,3}
{2,4} {1,4} {1,4}
{2,4} {1,5}
{2,5} {2,4}
{3,5} {2,5}
{2,6}
{3,5}
{3,6}
{4,6}
{1,3,5}
{2,4,6}
(End)

Crossrefs

Programs

  • GAP
    List([1..40], n-> Lucas(1,-1,n+1)[2] -n-1); # G. C. Greubel, Jul 09 2019
  • Magma
    [Lucas(n+1)-n-1: n in [1..40]]; // G. C. Greubel, Jul 09 2019
    
  • Mathematica
    a[1]=a[2]=1; a[n_]:= a[n] = a[n-1] +a[n-2] +n-2; Table[a[n], {n, 40}]
    LinearRecurrence[{3, -2, -1, 1}, {1, 1, 3, 6}, 40] (* Vladimir Joseph Stephan Orlovsky, Feb 13 2012 *)
    Table[LucasL[n+1]-n-1, {n, 40}] (* Vladimir Reshetnikov, Sep 15 2016 *)
    CoefficientList[Series[(1-2*x+2*x^2)/((1-x)^2*(1-x-x^2)), {x, 0, 40}], x] (* L. Edson Jeffery, Sep 28 2017 *)
  • PARI
    vector(40, n, my(f=fibonacci); f(n+2)+f(n)-n-1) \\ G. C. Greubel, Jul 09 2019
    
  • Sage
    [lucas_number2(n+1,1,-1) -n-1 for n in (1..40)] # G. C. Greubel, Jul 09 2019
    

Formula

a(1) = a(2) = 1, a(n + 2) = a(n + 1) + a(n) + n.
For n > 2, a(n) = floor(phi^(n+1) - (n+1)) + (1-(-1)^n)/2.
From Colin Barker, Jun 30 2012: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: x*(1-2*x+2*x^2)/((1-x)^2*(1-x-x^2)). (End)
a(n) is the sum of the n-th antidiagonal of A352744 (assuming offset 0). - Peter Luschny, Nov 16 2023

Extensions

Corrected and extended by Harvey P. Dale, Feb 08 2002

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

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 3, 1, 2, 2, 4, 1, 3, 3, 3, 5, 1, 4, 4, 5, 5, 6, 1, 5, 5, 7, 8, 8, 7, 1, 6, 6, 9, 11, 13, 13, 8, 1, 7, 7, 11, 14, 18, 21, 21, 9, 1, 8, 8, 13, 17, 23, 29, 34, 34, 10, 1, 9, 9, 15, 20, 28, 37, 47, 55, 55, 11, 1, 10, 10, 17, 23, 33, 45, 60, 76, 89, 89
Offset: 0

Views

Author

Peter Luschny, May 09 2022

Keywords

Comments

The definition declares the Fibonacci numbers for all integers n and k. It gives the classical Fibonacci numbers as F(0, n) = A000045(n). A different enumeration is given in A352744.

Examples

			Array starts:
n\k 0, 1,  2,  3,  4,  5,  6,   7,   8,   9, ...
--------------------------------------------------------
[0]  0, 1,  1,  2,  3,  5,  8, 13,  21,  34, ... A000045
[1]  1, 1,  2,  3,  5,  8, 13, 21,  34,  55, ... A000045 (shifted once)
[2]  2, 1,  3,  4,  7, 11, 18, 29,  47,  76, ... A000032
[3]  3, 1,  4,  5,  9, 14, 23, 37,  60,  97, ... A104449
[4]  4, 1,  5,  6, 11, 17, 28, 45,  73, 118, ... [4] + A022095
[5]  5, 1,  6,  7, 13, 20, 33, 53,  86, 139, ... [5] + A022096
[6]  6, 1,  7,  8, 15, 23, 38, 61,  99, 160, ... [6] + A022097
[7]  7, 1,  8,  9, 17, 26, 43, 69, 112, 181, ... [7] + A022098
[8]  8, 1,  9, 10, 19, 29, 48, 77, 125, 202, ... [8] + A022099
[9]  9, 1, 10, 11, 21, 32, 53, 85, 138, 223, ... [9] + A022100
		

Crossrefs

Cf. A000045, A000032, A104449, A094588 (main diagonal).
Cf. A352744, A354265 (generalized Lucas numbers).

Programs

  • Julia
    function fibrec(n::Int)
        n == 0 && return (BigInt(0), BigInt(1))
        a, b = fibrec(div(n, 2))
        c = a * (b * 2 - a)
        d = a * a + b * b
        iseven(n) ? (c, d) : (d, c + d)
    end
    function Fibonacci(n::Int, k::Int)
        k == 0 && return BigInt(n)
        k == 1 && return BigInt(1)
        k  < 0 && return (-1)^(k-1)*Fibonacci(-n - 1, 2 - k)
        a, b = fibrec(k - 1)
        a*n + b
    end
    for n in -6:6
        println([n], [Fibonacci(n, k) for k in -6:6])
    end
  • Maple
    f := n -> combinat:-fibonacci(n): F := (n, k) -> n*f(k - 1) + f(k):
    seq(seq(F(n - k, k), k = 0..n), n = 0..11);
    # The next implementation is for illustration only but is not recommended
    # as it relies on floating point arithmetic. Illustrates the case n,k < 0.
    phi := (1 + sqrt(5))/2: psi := (1 - sqrt(5))/2:
    F := (n, k) -> (psi^(k-1)*(psi + n) - phi^(k-1)*(phi + n)) / (psi - phi):
    for n from -6 to 6 do lprint(seq(simplify(F(n, k)), k = -6..6)) od;
  • Mathematica
    (* Works also for n < 0 and k < 0. Uses a remark from Bill Gosper. *)
    c := I*ArcSinh[1/2] - Pi/2;
    F[n_, k_] := (n Sin[(k - 1) c] - I Sin[k c]) / (I^k Sqrt[5/4]);
    Table[Simplify[F[n, k]], {n, 0, 6}, {k, 0, 6}] // TableForm

Formula

Functional equation extends Cassini's theorem:
F(n, k) = (-1)^(k - 1)*F(-n - 1, 2 - k).
F(n, k) = ((1 - phi)^(k - 1)*(1 - phi + n) - phi^(k - 1)*(phi + n))/(1 - 2*phi).
F(n, k) = n*fib(k - 1) + fib(k), where fib(n) are the classical Fibonacci numbers A000045 extended in the usual way for negative n.
F(n, k) - F(n-1, k) = fib(k-1).
F(n, k) = F(n, k-1) + F(n, k-2).
F(n, k) = (n*sin((k - 1)*c) - i*sin(k*c))/(i^k*sqrt(5/4)) where c = i*arcsinh(1/2) - Pi/2, for all n, k in Z. Based on a remark of Bill Gosper.

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.

Original entry on oeis.org

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, 18, 9, 19, 23, 32, 40, 47, 47, 29, 10, 22, 27, 39, 51, 65, 76, 76, 47, 11, 25, 31, 46, 62, 83, 105, 123, 123, 76, 12, 28, 35, 53, 73, 101, 134, 170, 199, 199, 123
Offset: 0

Views

Author

Peter Luschny, May 29 2022

Keywords

Comments

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.

Examples

			Array starts:
[0]  2,  1,  3,  4,   7,  11,  18,  29,  47,   76, ... A000032
[1]  3,  4,  7, 11,  18,  29,  47,  76, 123,  199, ... A000032 (shifted)
[2]  4,  7, 11, 18,  29,  47,  76, 123, 199,  322, ... A000032 (shifted)
[3]  5, 10, 15, 25,  40,  65, 105, 170, 275,  445, ... A022088
[4]  6, 13, 19, 32,  51,  83, 134, 217, 351,  568, ... A022388
[5]  7, 16, 23, 39,  62, 101, 163, 264, 427,  691, ... A190995
[6]  8, 19, 27, 46,  73, 119, 192, 311, 503,  814, ... A206420
[7]  9, 22, 31, 53,  84, 137, 221, 358, 579,  937, ... A206609
[8] 10, 25, 35, 60,  95, 155, 250, 405, 655, 1060, ...
[9] 11, 28, 39, 67, 106, 173, 279, 452, 731, 1183, ...
		

Crossrefs

Programs

  • Julia
    const FibMem = Dict{Int,Tuple{BigInt,BigInt}}()
    function FibRec(n::Int)
        get!(FibMem, n) do
            n == 0 && return (BigInt(0), BigInt(1))
            a, b = FibRec(div(n, 2))
            c = a * (b * 2 - a)
            d = a * a + b * b
            iseven(n) ? (c, d) : (d, c + d)
        end
    end
    function Lucas(n, k)
        k ==  0 && return BigInt(n + 2)
        k == -1 && return BigInt(2 * n - 1)
        k <   0 && return (-1)^k * Lucas(1 - n, -k - 2)
        a, b = FibRec(k)
        c, d = FibRec(k - 1)
        n * (2 * a + b) + 2 * c + d
    end
    for n in -6:6
        println([Lucas(n, k) for k in -6:6])
    end
  • Maple
    phi := (1 + sqrt(5))/2: psi := (1 - sqrt(5))/2:
    L := (n, k) -> phi^(k+1)*(n - psi) + psi^(k+1)*(n - phi):
    seq(seq(simplify(L(n-k, k)), k = 0..n), n = 0..10);
  • Mathematica
    L[n_, k_] := With[{c = Pi/2 + I*ArcCsch[2]},
                 I^k Sec[c] (n Cos[c (k + 1)] - I Cos[c k]) ];
    Table[Simplify[L[n, k]], {n, 0, 6}, {k, 0, 6}] // TableForm
    (* Alternative: *)
    L[n_, k_] := n*LucasL[k + 1] + LucasL[k];
    Table[Simplify[L[n, k]], {n, 0, 6}, {k, 0, 6}] // TableForm

Formula

Functional equation extends Cassini's theorem:
L(n, k) = (-1)^k*L(1 - n, -k - 2).
L(n, k) = n*Lucas(k + 1) + Lucas(k).
L(n, k) = L(n, k-1) + L(n, k-2).
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.
Using the generalized Fibonacci numbers F(n, k) = A352744(n, k),
L(n, k) = F(n, k+1) + F(n, k) + F(n, k-1) + F(n, k-2).

A352745 a(n) is the number of Lyndon factors of the Fibonacci string of length n.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 6, 5, 8, 6, 10, 7, 12, 8, 14, 9, 16, 10, 18, 11, 20, 12, 22, 13, 24, 14, 26, 15, 28, 16, 30, 17, 32, 18, 34, 19, 36, 20, 38, 21, 40, 22, 42, 23, 44
Offset: 0

Views

Author

Peter Luschny, Apr 06 2022

Keywords

Comments

The Fibonacci string of length n is defined Fibonacci(n) = cat(Fibonacci(n - 1), Fibonacci(n - 2)) for 1 < n and the initial conditions Fibonacci(0) = "1" and Fibonacci(1) = "0", where 'cat' is the operation of concatenating strings. The length of Fibonacci(n) is A352744(1, n). The sequence starts: "1", "0", "01", "010", "01001", "01001010", ...
Apart from the first four terms seems to be identical with A117248.

Examples

			The Lyndon factorization of the Fibonacci strings of length n = 0..9.
[0] ["1"]
[1] ["0"]
[2] ["01"]
[3] ["01", "0"]
[4] ["01", "001"]
[5] ["01", "00101", "0"]
[6] ["01", "00101", "001", "001"]
[7] ["01", "00101", "0010010100101", "0"]
[8] ["01", "00101", "0010010100101", "00100101", "001", "001"]
[9] ["01", "00101", "0010010100101", "0010010100100101001010010010100101", "0"]
		

Crossrefs

Programs

  • Maple
    with(StringTools): A352745 := n -> nops(LyndonFactors(Fibonacci(n))):
    seq(A352745(n), n = 0..12);

A353281 k is a term if 5 and 6 do not divide k and k does not divide F(n, j) for all j >= 0, where F(n, j) are the Fibonacci numbers.

Original entry on oeis.org

56, 91, 112, 153, 182, 224, 273, 364, 392, 406, 448, 459, 616, 637, 703, 728, 752, 784, 812, 819, 896, 952, 979, 1001, 1064, 1071, 1183, 1232, 1274, 1288, 1377, 1406, 1431, 1456, 1504, 1547, 1568, 1624, 1683, 1729, 1736, 1792, 1892, 1904, 1911, 1958, 1989
Offset: 1

Views

Author

Peter Luschny, Apr 10 2022

Keywords

Examples

			91 is a term because period(A352747(91, .)) = [34, 60, 86, 21, 47, 73, 8] is zero-free, and 5 and 6 do not divide 91.
		

Crossrefs

{a(n)} union A093509 = A353280.

Programs

A354267 A Fibonacci-Pascal triangle read by rows: T(n, n) = 1, T(n, n-1) = n - 1, T(n, 0) = T(n-1, 1) and T(n, k) = T(n-1, k-1) + T(n-1, k) for 0 < k < n-1.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 2, 2, 1, 2, 3, 4, 3, 1, 3, 5, 7, 7, 4, 1, 5, 8, 12, 14, 11, 5, 1, 8, 13, 20, 26, 25, 16, 6, 1, 13, 21, 33, 46, 51, 41, 22, 7, 1, 21, 34, 54, 79, 97, 92, 63, 29, 8, 1, 34, 55, 88, 133, 176, 189, 155, 92, 37, 9, 1, 55, 89, 143, 221, 309, 365, 344, 247, 129, 46, 10, 1
Offset: 0

Views

Author

Peter Luschny, May 31 2022

Keywords

Examples

			[0]  1;
[1]  0,  1;
[2]  1,  1,  1;
[3]  1,  2,  2,  1;
[4]  2,  3,  4,  3,  1;
[5]  3,  5,  7,  7,  4,  1;
[6]  5,  8, 12, 14, 11,  5,  1;
[7]  8, 13, 20, 26, 25, 16,  6,  1;
[8] 13, 21, 33, 46, 51, 41, 22,  7, 1;
[9] 21, 34, 54, 79, 97, 92, 63, 29, 8, 1;
		

Crossrefs

Cf. A212804 (first column, which is also row 0 of A352744), A099036 (row sums), A228074 (subtriangle), A000045 (Fibonacci), A371870 (central terms).

Programs

  • Maple
    T := proc(n, k) option remember;
    if n = k then 1 elif k = n-1 then n-1 elif k = 0 then T(n-1, 1) else
    T(n-1, k) + T(n-1, k-1) fi end: seq(seq(T(n, k), k = 0..n), n = 0..11);
  • Mathematica
    T[n_, k_] := Which[n == k, 1, k == n-1, n-1, k == 0, T[n-1, 1], True, T[n-1, k] + T[n-1, k-1]];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 29 2023 *)
  • Python
    from functools import cache
    @cache
    def A354267row(n):
        if n == 0: return [1]
        if n == 1: return [0, 1]
        row = A354267row(n - 1) + [1]
        s = row[1]
        for k in range(n-1, 0, -1):
            row[k] += row[k - 1]
        row[0] = s
        return row
    for n in range(10): print(A354267row(n))

Formula

T(n, 0) = Fibonacci(n - 1).
Showing 1-8 of 8 results.