login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 3
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, 17, 17, 17, 18, 19, 19, 19, 19, 19, 20, 21, 21, 21, 21, 21, 22, 23, 23, 23, 23, 23, 23, 24, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..10000

FORMULA

a(0) = 0, for n >= 1, a(n) = n - A265409(n).

If n <= 7, then a(n) = n, otherwise a(n) = a(n-1) + A240025(n) + A240025(n-1).

PROG

(Scheme, two variants)

(define (A265359 n) (if (zero? n) n (- n (A265409 n))))

(definec (A265359 n) (cond ((<= n 7) n) (else (+ (A265359 (- n 1)) (A240025 n) (A240025 (- n 1))))))

CROSSREFS

Cf. A000267, A002620, A240025, A265409.

Sequence in context: A134679 A100721 A271490 * A252649 A095703 A101041

Adjacent sequences:  A265356 A265357 A265358 * A265360 A265361 A265362

KEYWORD

nonn

AUTHOR

Antti Karttunen, Dec 16 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 17 22:17 EDT 2019. Contains 324200 sequences. (Running on oeis4.)