[go: up one dir, main page]

login
A252759
Manhattan distance of n in array A246278 from the top left corner: a(1) = 0; for n>1: a(n) = A055396(n) + A246277(n) - 1.
3
0, 1, 2, 2, 3, 3, 4, 4, 3, 5, 5, 6, 6, 7, 4, 8, 7, 9, 8, 10, 6, 11, 9, 12, 4, 13, 5, 14, 10, 15, 11, 16, 8, 17, 5, 18, 12, 19, 12, 20, 13, 21, 14, 22, 7, 23, 15, 24, 5, 25, 14, 26, 16, 27, 7, 28, 18, 29, 17, 30, 18, 31, 11, 32, 9, 33, 19, 34, 20, 35, 20, 36, 21, 37, 10, 38, 6, 39, 22, 40, 9, 41, 23, 42, 13, 43, 24, 44, 24, 45, 8
OFFSET
1,3
LINKS
FORMULA
a(1) = 0; for n>1: a(n) = A055396(n) + A246277(n) - 1.
EXAMPLE
a(2) = 1, because 2 sits nearest to the top-left corner of the array A246278.
PROG
(Scheme) (define (A252759 n) (if (= 1 n) 0 (+ -1 (A055396 n) (A246277 n))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 03 2015
STATUS
approved