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.

A322832 Values x + y, where the ordered pairs (x,y) are sorted first by maximal coordinate and then lexicographically.

This page as a plain text file.
%I A322832 #18 Jan 19 2019 03:44:39
%S A322832 0,1,1,2,2,3,2,3,4,3,4,5,3,4,5,6,4,5,6,7,4,5,6,7,8,5,6,7,8,9,5,6,7,8,
%T A322832 9,10,6,7,8,9,10,11,6,7,8,9,10,11,12,7,8,9,10,11,12,13,7,8,9,10,11,12,
%U A322832 13,14,8,9,10,11,12,13,14,15,8,9,10,11,12,13,14,15,16
%N A322832 Values x + y, where the ordered pairs (x,y) are sorted first by maximal coordinate and then lexicographically.
%C A322832 This sequence consists of runs of length A008619(k) with initial elements A004526(k+1) and final elements A001477(k).
%H A322832 David A. Corneth, <a href="/A322832/b322832.txt">Table of n, a(n) for n = 0..10200</a>
%F A322832 From _David A. Corneth_, Jan 11 2019: (Start)
%F A322832 a(n^2 + j) = n + j for 0 <= j <= n-1.
%F A322832 a(n^2 + j) = j, n <= j <= 2*n (End)
%e A322832 The sorted pairs (x,y) and their sums x+y are:
%e A322832 (0,0) => 0
%e A322832 (0,1) => 1
%e A322832 (1,0) => 1
%e A322832 (1,1) => 2
%e A322832 (0,2) => 2
%e A322832 (1,2) => 3
%e A322832 (2,0) => 2
%e A322832 (2,1) => 3
%e A322832 (2,2) => 4
%e A322832 (0,3) => 3
%e A322832 etc.
%o A322832 (PARI) first(n) = {n = (sqrtint(n) + 1) ^ 2; res = vector(n); for(i = 0, sqrtint(n) - 1, res[i^2 + 1] = i; for(j = 1, i - 1, res[i ^ 2 + j + 1] = i + j; ); for(j = i, 2 * i, res[i ^ 2 + j + 1] = j; ) ); res } \\ _David A. Corneth_, Jan 11 2019
%Y A322832 Cf. A008619, A004526, A001477, A260617.
%K A322832 nonn,easy,look
%O A322832 0,4
%A A322832 _Charlie Neder_, Dec 27 2018
%E A322832 Edited by _N. J. A. Sloane_, Dec 28 2018