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 A265359 #6 Dec 18 2015 11:21:40 %S A265359 0,1,2,3,4,5,6,7,7,8,9,9,10,11,11,11,12,13,13,13,14,15,15,15,15,16,17, %T A265359 17,17,17,18,19,19,19,19,19,20,21,21,21,21,21,22,23,23,23,23,23,23,24, %U A265359 25,25,25,25,25,25,26,27,27,27,27,27,27,27,28,29,29,29,29,29,29,29,30,31,31,31,31,31,31,31,31,32 %N A265359 Spiralwise distance to the nearest inner neighbor in Ulam-style square-spirals using zero-based indexing: a(0) = 0, for n >= 1, a(n) = n - A265409(n). %H A265359 Antti Karttunen, <a href="/A265359/b265359.txt">Table of n, a(n) for n = 0..10000</a> %F A265359 a(0) = 0, for n >= 1, a(n) = n - A265409(n). %F A265359 If n <= 7, then a(n) = n, otherwise a(n) = a(n-1) + A240025(n) + A240025(n-1). %o A265359 (Scheme, two variants) %o A265359 (define (A265359 n) (if (zero? n) n (- n (A265409 n)))) %o A265359 (definec (A265359 n) (cond ((<= n 7) n) (else (+ (A265359 (- n 1)) (A240025 n) (A240025 (- n 1)))))) %Y A265359 Cf. A000267, A002620, A240025, A265409. %K A265359 nonn %O A265359 0,3 %A A265359 _Antti Karttunen_, Dec 16 2015