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.

A246696 Triangle t(n,k) = t(n,k-2) + 2 if n > 1 and 2 <= k <= n; t(0,0) = 1, t(1,0) = 2, t(1,1) = 3; if n > 1 is odd, then t(n,0) = t(n-1,n-2) + 2 and t(n,1) = t(n-1,n-1) + 2; if n > 1 is even, then t(n,0) = t(n-1,n-1) + 2 and t(n,1) = t(n-1,n-2) + 2.

This page as a plain text file.
%I A246696 #16 Oct 23 2024 01:27:35
%S A246696 1,2,3,5,4,7,6,9,8,11,13,10,15,12,17,14,19,16,21,18,23,25,20,27,22,29,
%T A246696 24,31,26,33,28,35,30,37,32,39,41,34,43,36,45,38,47,40,49,42,51,44,53,
%U A246696 46,55,48,57,50,59,61,52,63,54,65,56,67,58,69,60,71,62
%N A246696 Triangle t(n,k) = t(n,k-2) + 2 if n > 1 and 2 <= k <= n;  t(0,0) = 1, t(1,0) = 2, t(1,1) = 3; if n > 1 is odd, then t(n,0) = t(n-1,n-2) + 2 and t(n,1) = t(n-1,n-1) + 2; if n > 1 is even, then t(n,0) = t(n-1,n-1) + 2 and t(n,1) = t(n-1,n-2) + 2.
%C A246696 As an array, for each m, row 2*m has m even numbers and [(m+1)/2] odd numbers, and row 2*m-1 has m odds and m evens.  Every positive number occurs exactly once, so that as a sequence (with offset 1), this is a permutation of the positive integers, with inverse A246698.
%F A246696 For m >= 0, {t(2*m,0)} = A001844. - _Ruud H.G. van Tol_, Sep 30 2024
%e A246696 First 8 rows:
%e A246696 1
%e A246696 2 ... 3
%e A246696 5 ... 4 ... 7
%e A246696 6 ... 9 ... 8 ... 11
%e A246696 13 .. 10 .. 15 .. 12 .. 17
%e A246696 14 .. 19 .. 16 .. 21 .. 18 .. 23
%e A246696 25 .. 20 .. 27 .. 22 .. 29 .. 24 .. 31
%e A246696 26 .. 33 .. 28 .. 35 .. 30 .. 37 .. 32 .. 39
%t A246696 z = 25; t[0, 0] = 1; t[1, 0] = 2; t[1, 1] = 3; t[n_, 0] := t[n, 0] = If[OddQ[n], t[n - 1, n - 2] + 2, t[n - 1, n - 1] + 2]; t[n_, 1] := t[n, 1] = If[OddQ[n], t[n - 1, n - 1] + 2, t[n - 1, n - 2] + 2]; t[n_, k_] := t[n, k] = t[n, k - 2] + 2;
%t A246696 u = Flatten[Table[t[n, k], {n, 0, z}, {k, 0, n}]] (* A246696 *)
%Y A246696 Cf. A246697 (row sums), A246698 (inverse permutation), A246694.
%Y A246696 Cf. A001844, A047838 (main diagonal), A128174 (parity).
%K A246696 nonn,easy,tabl
%O A246696 0,2
%A A246696 _Clark Kimberling_, Sep 17 2014
%E A246696 Edited by _M. F. Hasler_, Nov 17 2014