login
The OEIS is supported by the many generous donors 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
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
Sequence in context: A134679 A100721 A337979 * A271490 A252649 A095703
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)