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.

A340804 Triangle read by rows: T(n, k) = 1 + k*(n - 1) + (2*k - n - 1)*(k mod 2) with 0 < k <= n.

This page as a plain text file.
%I A340804 #13 Oct 23 2022 09:20:21
%S A340804 1,1,3,1,5,9,1,7,11,13,1,9,13,17,25,1,11,15,21,29,31,1,13,17,25,33,37,
%T A340804 49,1,15,19,29,37,43,55,57,1,17,21,33,41,49,61,65,81,1,19,23,37,45,55,
%U A340804 67,73,89,91,1,21,25,41,49,61,73,81,97,101,121,1,23,27,45,53,67,79,89,105,111,131,133
%N A340804 Triangle read by rows: T(n, k) = 1 + k*(n - 1) + (2*k - n - 1)*(k mod 2) with 0 < k <= n.
%C A340804 T(n, k) is the k-th diagonal element of an n X n square matrix M(n) formed by writing the numbers 1, ..., n^2 successively forward and backward along the rows in zig-zag pattern.
%C A340804 It includes exclusively all the odd numbers (A005408). Except the term 1, all the other odd numbers appear a finite number of times.
%H A340804 Stefano Spezia, <a href="/A340804/b340804.txt">Table of n, a(n) for n = 1..11325</a> (first 150 rows of the triangle, flattened).
%F A340804 O.g.f.: (1 + y - 3*y^2 + y^3 + x*(-1 - y + 5*y^2 + y^3))/((-1 + x)^2*(-1 + y)^2*(1+y)^2).
%F A340804 E.g.f.: exp(x - y)*(1 + x + 2*y + exp(2*y)*(1 + x*(-1 + 2*y)))/2.
%e A340804 1
%e A340804 1,  3
%e A340804 1,  5,  9,
%e A340804 1,  7, 11, 13
%e A340804 1,  9, 13, 17, 25
%e A340804 1, 11, 15, 21, 29, 31
%e A340804 1, 13, 17, 25, 33, 37, 49
%e A340804 ...
%t A340804 Table[1+k(n-1)+(2k-n-1)Mod[k,2],{n,12},{k,n}]//Flatten
%o A340804 (PARI) T(n, k) = 1 + k*(n - 1) + (2*k - n - 1)*(k % 2); \\ _Michel Marcus_, Jan 25 2021
%Y A340804 Cf. A005408, A317614 (row sums).
%Y A340804 Cf. A000012 (1st column), A006010 (sum of the first n rows), A060747 (2nd column), A074147 (antidiagonals of M matrices), A241016 (row sums of M matrices), A317617 (column sums of M matrices), A322277 (permanent of M matrices), A323723 (subdiagonal sum of M matrices), A323724 (superdiagonal sum of M matrices).
%K A340804 nonn,tabl
%O A340804 1,3
%A A340804 _Stefano Spezia_, Jan 22 2021