A304584 A linear mapping a(n) = x + d*n of pairs of nonnegative integers (x,d), where the pairs are enumerated by antidiagonals.
0, 1, 2, 2, 5, 10, 3, 9, 17, 27, 4, 14, 26, 40, 56, 5, 20, 37, 56, 77, 100, 6, 27, 50, 75, 102, 131, 162, 7, 35, 65, 97, 131, 167, 205, 245, 8, 44, 82, 122, 164, 208, 254, 302, 352, 9, 54, 101, 150, 201, 254, 309, 366, 425, 486, 10, 65, 122, 181, 242, 305, 370, 437, 506, 577, 650, 11
Offset: 0
Keywords
Examples
d: 5 | 20 4 | 14 19 3 | 9 13 18 2 | 5 8 12 17 1 | 2 4 7 11 16 0 | 0 1 3 6 10 15 |________________________ x: 0 1 2 3 4 5 . a(13) = 1 + 13*3 = 40 because the 13th position in the enumeration corresponds to x=1 and d=3.
Links
- Rainer Rosenthal, Table of n, a(n) for n = 0..10000
Programs
-
Maple
pos2pair:=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;return [k-e,e];end:WhereFlea:=proc(n) local x,d,pair; pair:=pos2pair(n);x:=pair[1];d:=pair[2];return x+d*n;end: seq(WhereFlea(n),n=0..66);# Rainer Rosenthal, May 23 2018
Comments