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.

A362363 Arm number of the base spiral in A362249 which visits large spiral point n there.

This page as a plain text file.
%I A362363 #38 May 28 2023 08:46:03
%S A362363 0,0,2,3,0,0,0,1,0,1,2,0,2,2,0,3,0,0,0,0,0,2,0,1,0,1,0,0,2,0,2,2,2,3,
%T A362363 0,3,0,3,0,0,0,0,0,2,0,2,0,1,0,1,0,0,2,0,2,0,2,2,2,2,0,3,0,3,0,3,0,0,
%U A362363 0,0,0,0,0,2,0,2,0,1,0,1,0,1,0,1,2,0,2
%N A362363 Arm number of the base spiral in A362249 which visits large spiral point n there.
%C A362363 Arms are numbered 0,1,2,3 for the base spirals with first segment directed East, South, West, North, respectively.
%C A362363 This numbering is successive arms around in the same direction that the spirals themselves turn (both clockwise in the diagrams in A362249).
%F A362363 If n is a square:
%F A362363 a(n) = 3*(n+1 mod 2); (a(n) = 3 for even squares).
%e A362363 a(5) = 0 because A362249(5) = 13 that is on spiral "E", which is encoded here as 0.
%e A362363 a(8) = 1 because A362249(8) = 58 that is on spiral "S", which is encoded here as 1.
%e A362363 a(11) = 2 because A362249(11) = 139 that is on spiral "W", which is encoded here as 2.
%e A362363 a(34) = 3 because A362249(34) = 1000 that is on spiral "N", which is encoded here as 3.
%o A362363 (MATLAB)
%o A362363 function a  = A362363( max_n )
%o A362363     E = [0 ; 0]; S = [0 ; 0]; W = [0 ; 0]; N = [0 ; 0]; V = [0 0];
%o A362363     for k = 1:4*max_n
%o A362363         l = V(1+mod(k+1,2)); s = (-1)^floor(k/2);
%o A362363         for m = l+(1*s):s:s*k
%o A362363             V(1+mod(k+1,2)) = m; V2 = V(end:-1:1).*[-1 1];
%o A362363             N = [N V2']; E = [E V']; S = [S -V2']; W = [W -V'];
%o A362363         end
%o A362363     end
%o A362363     for n = 2:max_n
%o A362363         [th,r] = cart2pol(E(1,n), E(2,n));
%o A362363         rot = [cos(-th) -sin(-th); sin(-th) cos(-th)];
%o A362363         v = E(:,n)'*rot*r;
%o A362363         jE = find(sum(abs([E(1,:)-v(1); E(2,:)-v(2)]),1) < 0.5);
%o A362363         jS = find(sum(abs([S(1,:)-v(1); S(2,:)-v(2)]),1) < 0.5);
%o A362363         jW = find(sum(abs([W(1,:)-v(1); W(2,:)-v(2)]),1) < 0.5);
%o A362363         jN = find(sum(abs([N(1,:)-v(1); N(2,:)-v(2)]),1) < 0.5);
%o A362363         a(n-1) = find([length(jE) length(jS) length(jW) length(jN)] > 0) - 1;
%o A362363     end
%o A362363 end % _Thomas Scheuerle_, Apr 19 2023
%Y A362363 Cf. A362249, A362265 (indices of 0's).
%K A362363 nonn
%O A362363 1,3
%A A362363 _Tamas Sandor Nagy_ and _Thomas Scheuerle_, Apr 17 2023