cp's OEIS Frontend

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.

A331363 Pairs of coordinates of the corners in a counterclockwise triangular spiral.

This page as a plain text file.
%I A331363 #45 Sep 13 2020 17:02:07
%S A331363 0,0,1,0,0,1,-2,-1,3,-1,0,2,-4,-2,5,-2,0,3,-6,-3,7,-3,0,4,-8,-4,9,-4,
%T A331363 0,5,-10,-5,11,-5,0,6,-12,-6,13,-6,0,7,-14,-7,15,-7,0,8,-16,-8,17,-8,
%U A331363 0,9,-18,-9,19,-9,0,10,-20,-10,21,-10,0,11
%N A331363 Pairs of coordinates of the corners in a counterclockwise triangular spiral.
%C A331363 Odd n yields the x- and even n the y-coordinates (i.e., x- and y-coordinates alternate in the sequence).
%H A331363 <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,2,0,0,0,0,0,-1).
%F A331363 a(n) = ceiling(1/18*n*((2 - n) mod 6 + 4*n mod (-3) + 1)), for n >= 1.
%F A331363 x(n) = ceiling(n - 2/3*(n^2 + 1) mod 3), for n >= 1 (x-coordinates).
%F A331363 y(n) = floor(2*n/3)*((2 - n) mod (-3) + 1), for n >= 1 (y-coordinates).
%F A331363 From _Colin Barker_, May 03 2020: (Start)
%F A331363 G.f.: x^3*(1 + x^3 - 2*x^4 - x^5 + x^6 - x^7) / ((1 - x)^2*(1 + x)^2*(1 - x + x^2)^2*(1 + x + x^2)^2).
%F A331363 a(n) = 2*a(n-6) - a(n-12) for n>12.
%F A331363 (End)
%F A331363 From _Wolfdieter Lang_, Jul 13 2020: (Start)
%F A331363 Bisection: x(k) = a(2*k-1). x(3+3*l) = 0, x(1+3*l) = -2*l, x(2+3*l) = 1+2*l, for l >= 0.
%F A331363 x(k) = (2*(k-1)*modp((k-4)^2,3) - (2*k-1)*modp((k-2)^2,3) + 1)/3, for k >= 1.
%F A331363 y(k) = a(2*k). y(3+3*k) = 1+l, y(1+3*k) = -l =  y(2+3*k), for l >= 0.
%F A331363 y(k) = ((k-1)*modp((k-1)^2,3) + (k-2)*modp((k+1)^2,3) - k*modp(k^2,3) -(k-3))/3, k >= 1.
%F A331363 G.f.s: Gx(t) = t^2*(1 - 2*t^2 + t^3)/(1 - t^3)^2, and Gy(t) = t^3*(1 - t - t^2) / (1 - t^3)^2.
%F A331363 This produces the g.f. G(x) = Gy(x^2) + Gx(x^2)/x given by _Colin Barker_.
%F A331363 (End)
%e A331363 X- and y-coordinates of the corners alternate in the sequence: 0, 0, 1, 0, 0, 1, -2,-1, 3, -1, ...
%e A331363                       (0,4)
%e A331363                      .     \
%e A331363                     .       \
%e A331363                    .         \
%e A331363                       (0,3)   \
%e A331363                      /     \   \
%e A331363                     /       \   \
%e A331363                    /         \   \
%e A331363                   /   (0,2)   \   \
%e A331363                  /   /     \   \   \
%e A331363                 /   /       \   \   \
%e A331363                /   /         \   \   \
%e A331363               /   /   (0,1)   \   \   \
%e A331363              /   /   /     \   \   \   \
%e A331363             /   /   /       \   \   \   \
%e A331363            /   /   /         \   \   \   \
%e A331363           /   /   /   (0,0)->(1,0)\   \   \
%e A331363          /   /   /                 \   \   \
%e A331363         /   /   /                   \   \   \
%e A331363        /   /  (-2,-1)------------->(3,-1)\   \
%e A331363       /   /                               \   \
%e A331363      /   /                                 \   \
%e A331363     /  (-4,-2)--------------------------->(5,-2)\
%e A331363    /                                             \
%e A331363   /                                               \
%e A331363 (-6,-3)------------------------------------------>(7,-3)
%t A331363 a[n_] := Ceiling[1/18*n*(Mod[2 - n, 6] + 4*Mod[n, -3] + 1)]; Table[ a[n], {n, 66}] (* or *)
%t A331363 LinearRecurrence[{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, -1}, {0, 0, 1, 0, 0, 1, -2, -1, 3, -1, 0, 2}, 66]
%Y A331363 Cf. A329116, A329972.
%K A331363 sign,look
%O A331363 1,7
%A A331363 _Mikk Heidemaa_, May 03 2020