A211011 Value on the axis "y" of the endpoint of the structure (or curve) of A211000 at n-th stage.
0, 1, 0, -1, -2, -3, -4, -5, -6, -7, -6, -5, -4, -3, -2, -1, -2, -3, -4, -5, -6, -7, -6, -5, -4, -3, -4, -5, -4, -3, -2, -1, 0, 1, 0, -1, 0, 1, 2, 3, 2, 1, 0, -1, -2, -3, -2, -1, 0, 1, 0, -1, 0, 1, 2, 3, 2, 1, 2, 3, 4, 5, 6, 7, 6, 5, 6, 7, 8, 9, 8, 7, 6, 5
Offset: 0
Examples
Consider the illustration of the structure of A211000: ------------------------------------------------------ . After After After . y 9 stages 10 stages 11 stages ------------------------------------------------------ . 2 . 1 1 1 1 . 0 0 2 0 2 0 2 . -1 3 3 3 . -2 4 4 4 . -3 5 5 5 . -4 6 6 6 . -5 7 7 11 . -6 8 10 8 10 8 . -7 9 9 9 . -8 We can see that a(7) = a(11) = -5.
Links
Crossrefs
Programs
-
Mathematica
A211011[nmax_]:=Module[{ep={0,0},angle=3/4Pi,turn=Pi/2},Join[{0},Table[If[!PrimeQ[n],If[n>5&&PrimeQ[n-1],turn*=-1];angle-=turn];Last[ep=AngleVector[ep,{Sqrt[2],angle}]],{n,0,nmax-1}]]]; A211011[100] (* Paolo Xausa, Jan 14 2023 *)
Formula
abs(a(n)-a(n+1)) = 1.
Comments