login
A323259
a(n) is the Y-coordinate of the n-th point of the first type of Wunderlich curve (starting at the origin and occupying the first quadrant).
3
0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 5, 5, 4, 3, 3, 4, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 7, 6, 6, 7, 8, 8, 7, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 5, 5, 4, 3, 3, 4, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 10, 11, 11, 10
OFFSET
1,7
PROG
(PARI) s = [0, 1, 2, 2+I, 1+I, I, 2*I, 1+2*I, 2+2*I];
w = apply(z -> imag(z) + I*real(z), s);
r = [0, 1, 0, 3, 2, 3, 0, 1, 0]
a(n) = {
my (d=if (n>1, Vecrev(digits(n-1, 9)), [0]), z=s[1+d[1]]);
for (i=2, #d,
my (c=(3^(i-1)-1)/2*(1+I));
z = 3^(i-1) * w[1+d[i]] + c + (z-c) * I^r[1+d[i]];
);
return (imag(z));
}
CROSSREFS
See A323258 for the X-coordinate and additional comments.
Sequence in context: A055224 A126295 A266686 * A330918 A162352 A285509
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jan 09 2019
STATUS
approved