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.
%I A304585 #18 Nov 09 2018 18:30:49 %S A304585 0,1,2,6,5,2,3,9,17,27,40,34,26,16,4,5,20,37,56,77,100,126,111,94,75, %T A304585 54,31,6,7,35,65,97,131,167,205,245,288,260,230,198,164,128,90,50,8,9, %U A304585 54,101,150,201,254,309,366,425,486,550,505,458,409,358,305,250,193,134,73,10,11 %N A304585 A linear mapping a(n) = x + d*n of pairs of nonnegative integers (x,d), where the pairs are enumerated by meandering antidiagonals. %C A304585 The sequence is an alternative solution to the riddle described in the comments of A304584. %H A304585 Rainer Rosenthal, <a href="/A304585/b304585.txt">Table of n, a(n) for n = 0..10000</a> %e A304585 d: %e A304585 5 | 20 %e A304585 4 | 10 19 %e A304585 3 | 9 11 18 %e A304585 2 | 3 8 12 17 %e A304585 1 | 2 4 7 13 16 %e A304585 0 | 0 1 5 6 14 15 %e A304585 |________________________ %e A304585 x: 0 1 2 3 4 5 %e A304585 . %e A304585 a(13)= 3 + 13*1 = 16 because the 13th position in the enumeration corresponds to x=3 and d=1. %p A304585 pos2pM:=proc(n) local w,k,e;w:=floor(sqrt(2*n));if w*(w+1)>2*n then k:=w-1;else k:=w;fi;e:=n-k*(k+1)/2;if modp(k,2)=1 then return [k-e,e];else return [e,k-e];fi end: WhereFlea:=proc(n) local x,d,pair; pair:=pos2pM(n);x:=pair[1];d:=pair[2];return x+d*n;end: seq(WhereFlea(n),n=0..66); # _Rainer Rosenthal_, May 23 2018 %Y A304585 Cf. A304584, A304586, A304587. %K A304585 nonn %O A304585 0,3 %A A304585 _Hugo Pfoertner_, May 16 2018