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.

A368045 Triangle read by rows. T(n, k) = (k*(k + 1)*(2*k + 1) + n*(n + 1)*(2*n + 1)) / 6.

This page as a plain text file.
%I A368045 #23 Mar 28 2025 07:59:46
%S A368045 0,1,2,5,6,10,14,15,19,28,30,31,35,44,60,55,56,60,69,85,110,91,92,96,
%T A368045 105,121,146,182,140,141,145,154,170,195,231,280,204,205,209,218,234,
%U A368045 259,295,344,408,285,286,290,299,315,340,376,425,489,570
%N A368045 Triangle read by rows. T(n, k) = (k*(k + 1)*(2*k + 1) + n*(n + 1)*(2*n + 1)) / 6.
%C A368045 Consider a sequence-to-triangle transformation a -> T, where a is a 0-based sequence and T a regular (0, 0)-based triangular array. The transformation is recursively defined, starting with T(0, 0) = 0, and T(n, n) = a(n) + T(n, n - 1) for n > 0. For k <> n let T(n, k) = a(n) + T(n-1, k).
%C A368045 If a(n) = 1, then T = A051162; if a(n) = n, then T = A367964 (generalizing the triangular numbers); if a(n) = n^2, then T is this triangle.
%C A368045 In the multiplicative form of the transformation, T(0, 0) is set to 1, and the operation '+' is replaced by '*'. For instance, a(n) = 2 is then mapped to T = A368043 and a(n) = n to A143216.
%F A368045 T(n, k) = A000330(k) + A000330(n).
%e A368045 Triangle T(n, k) starts:
%e A368045   [0] [  0]
%e A368045   [1] [  1,   2]
%e A368045   [2] [  5,   6,  10]
%e A368045   [3] [ 14,  15,  19,  28]
%e A368045   [4] [ 30,  31,  35,  44,  60]
%e A368045   [5] [ 55,  56,  60,  69,  85, 110]
%e A368045   [6] [ 91,  92,  96, 105, 121, 146, 182]
%e A368045   [7] [140, 141, 145, 154, 170, 195, 231, 280]
%e A368045   [8] [204, 205, 209, 218, 234, 259, 295, 344, 408]
%e A368045   [9] [285, 286, 290, 299, 315, 340, 376, 425, 489, 570]
%t A368045 Module[{n=1},NestList[Append[#+n^2,Last[#]+2(n++^2)]&,{0},10]] (* or *)
%t A368045 Table[(k(k+1)(2k+1)+n(n+1)(2n+1))/6,{n,0,10},{k,0,n}] (* _Paolo Xausa_, Dec 10 2023 *)
%o A368045 (Python)
%o A368045 from functools import cache
%o A368045 @cache
%o A368045 def Trow(n: int) -> list[int]:
%o A368045     if n == 0: return [0]
%o A368045     row = Trow(n - 1) + [0]
%o A368045     for k in range(n): row[k] += n * n
%o A368045     row[n] = row[n - 1] + n * n
%o A368045     return row
%o A368045 print([k for n in range(10) for k in Trow(n)])
%Y A368045 Cf. A000330 (T(n,0)), A056520 (T(n,1)), A005900 (T(n-1,n)), A006331 (T(n,n)), A094952 (T(2*n,n)), A368046 (row sums), A368047 (alternating row sums).
%Y A368045 Cf. A051162 (transform of n^0), A367964 (transform of n^1), this sequence (transform of n^2).
%Y A368045 Cf. A368043, A143216.
%K A368045 nonn,tabl,easy
%O A368045 0,3
%A A368045 _Peter Luschny_, Dec 09 2023