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.

A374438 Triangle read by rows: T(n, k) = T(n - 1, k) + T(n - 2, k - 2), with initial values T(n, k) = k + 1 for k < 3.

This page as a plain text file.
%I A374438 #14 Jul 22 2024 08:18:56
%S A374438 1,1,2,1,2,3,1,2,3,2,1,2,3,4,3,1,2,3,6,6,2,1,2,3,8,9,6,3,1,2,3,10,12,
%T A374438 12,9,2,1,2,3,12,15,20,18,8,3,1,2,3,14,18,30,30,20,12,2,1,2,3,16,21,
%U A374438 42,45,40,30,10,3,1,2,3,18,24,56,63,70,60,30,15,2
%N A374438 Triangle read by rows: T(n, k) = T(n - 1, k) + T(n - 2, k - 2), with initial values T(n, k) = k + 1 for k < 3.
%C A374438 See A374439 and the cross-references for comments about this family of triangles, where the recurrence is defined as in the name, but with an additional parameter m for the initial values: T(n, k) = k + 1 for k < m.
%C A374438 As m -> oo, the rows of the triangles become the initial segments of the integers.
%e A374438 Triangle starts:
%e A374438   [ 0] [1]
%e A374438   [ 1] [1, 2]
%e A374438   [ 2] [1, 2, 3]
%e A374438   [ 3] [1, 2, 3,  2]
%e A374438   [ 4] [1, 2, 3,  4,  3]
%e A374438   [ 5] [1, 2, 3,  6,  6,  2]
%e A374438   [ 6] [1, 2, 3,  8,  9,  6,  3]
%e A374438   [ 7] [1, 2, 3, 10, 12, 12,  9,  2]
%e A374438   [ 8] [1, 2, 3, 12, 15, 20, 18,  8,  3]
%e A374438   [ 9] [1, 2, 3, 14, 18, 30, 30, 20, 12,  2]
%e A374438   [10] [1, 2, 3, 16, 21, 42, 45, 40, 30, 10, 3]
%p A374438 M := 3;  # family index
%p A374438 T := proc(n, k) option remember; if k > n then 0 elif k < M then k + 1 else
%p A374438 T(n - 1, k) + T(n - 2, k - 2) fi end:
%p A374438 seq(seq(T(n, k), k = 0..n), n = 0..11);
%o A374438 (Python)
%o A374438 from functools import cache
%o A374438 @cache
%o A374438 def T(n: int, k: int) -> int:
%o A374438     if k > n: return 0
%o A374438     if k < 3: return k + 1
%o A374438     return T(n - 1, k) + T(n - 2, k - 2)
%Y A374438 Family of triangles: A162515 (m=1, Fibonacci), A374439 (m=2, Lucas), this triangle (m=3).
%Y A374438 Row sums: A187890 (apart from initial terms), also A001060 + 1 (with 1 prepended).
%Y A374438 Cf. A006355 (odd sums), A187893 (even sums).
%Y A374438 Cf. related to deltas: A065220, A210673.
%K A374438 nonn,tabl
%O A374438 0,3
%A A374438 _Peter Luschny_, Jul 22 2024