OFFSET
0,3
COMMENTS
Secondary sorting by polar angle is equivalent to secondary sorting by y.
The sequence is an alternative solution to the riddle described in the comments of A304584.
EXAMPLE
y:
|
8 | 57 61 63 66 70
|
7 | 44 47 51 53 60 68
|
6 | 34 36 38 42 49 55 64
|
5 | 25 27 29 32 40 46 54 67
|
4 | 16 18 21 24 30 39 48 59 69
|
3 | 10 12 14 19 23 31 41 52 65
|
2 | 5 7 8 13 20 28 37 50 62
|
1 | 2 3 6 11 17 26 35 45 58
|
0 | 0 1 4 9 15 22 33 43 56 71
_______________________________________
x: 0 1 2 3 4 5 6 7 8 9
.
a(5) = x(5) + 5*y(5) = 0 + 5*2 = 10,
a(14) = x(14) + 14*y(14) = 2 + 14*3 = 44,
a(20) = x(20) + 20*y(20) = 4 + 20*2 = 44.
PROG
(PARI) n=-1; for(r2=0, 81, for(y=0, round(sqrt(r2)), x2=r2-y^2; if(issquare(x2), print1(round(sqrt(x2))+y*(n++), ", "))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jun 15 2018
STATUS
approved