%I #12 Aug 17 2018 11:01:50
%S 1,2,3,2,5,4,5,4,5,4,5,4,5,4,3,4,3,2,3,2,1,2,1,2,3,2,3,4,3,4,5,6,5,6,
%T 7,8,7,8,9,10,11,8,11,12,13,12,9,10,13,16,15,12,9,12,15,16,15,12,9,12,
%U 15,14,13,12,11,12,13,12,11,10,9,10,11,10,9,8,7,8,9
%N a(n) is the Manhattan distance between n and 2*n in a square spiral of positive integers with 1 at the center.
%C Spiral begins:
%C .
%C 49 26--27--28--29--30--31
%C | | |
%C 48 25 10--11--12--13 32
%C | | | | |
%C 47 24 9 2---3 14 33
%C | | | | | | |
%C 46 23 8 1 4 15 34
%C | | | | | |
%C 45 22 7---6---5 16 35
%C | | | |
%C 44 21--20--19--18--17 36
%C | |
%C 43--42--41--40--39--38--37
%C .
%C Numbers n such that a(n)^2=n: 1, 4, 16, 625, 20736, 707281, 24010000, 815730721, ...; that is, 1, 4, 2^4, 5^4, 12^4, 29^4, 70^4, 169^4, ... (cf. Pell numbers: A000129).
%Y Cf. A000129, A214526, A232114, A232115.
%K nonn
%O 1,2
%A _Alex Ratushnyak_, Nov 19 2013