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.

A033988 Write 0,1,2,... in a clockwise spiral on a square lattice, writing each digit at a separate lattice point, starting with 0 at the origin and 1 at x=0, y=-1; sequence gives the numbers on the positive y-axis.

This page as a plain text file.
%I A033988 #36 Aug 15 2018 03:38:56
%S A033988 0,5,1,4,3,7,8,0,4,7,7,1,2,6,2,1,8,7,4,2,6,1,8,9,2,7,6,0,6,5,1,2,0,4,
%T A033988 1,5,8,5,1,8,8,8,2,1,2,3,2,4,9,0,2,8,9,9,3,3,2,0,3,7,9,3,4,2,8,8,4,7,
%U A033988 1,5,5,3,7,4,5,9,7,5,6,5,9,8,7,1,5,3,7,8,4,0,8,5,6,9,9,3,1,0,9,8,1,1,6,9,9
%N A033988 Write 0,1,2,... in a clockwise spiral on a square lattice, writing each digit at a separate lattice point, starting with 0 at the origin and 1 at x=0, y=-1; sequence gives the numbers on the positive y-axis.
%C A033988 In other words, write 0 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 ... in a clockwise spiral, starting with the 0 and taking the first step south; the sequence is then picked out from the resulting spiral by starting at the origin and moving north.
%H A033988 Andrew Woods, <a href="/A033988/b033988.txt">Table of n, a(n) for n = 0..1000</a>
%F A033988 a(n) = A033307(4*n^2 + n - 1) for n > 0. - _Andrew Woods_, May 18 2012
%e A033988   1---3---1---4---1
%e A033988   |               |
%e A033988   2   4---5---6   5
%e A033988   |   |       |   |
%e A033988   1   3   0   7   1
%e A033988   |   |   |   |   |
%e A033988   1   2---1   8   6
%e A033988   |           |   |
%e A033988   1---0---1---9   1
%e A033988 .
%e A033988 We begin with the 0 and wrap the numbers 1 2 3 4 ... around it.
%e A033988 Then the sequence is obtained by reading vertically upwards, starting from the initial 0.
%t A033988 nmax = 105; A033307 = Flatten[IntegerDigits /@ Range[0, nmax^2 + 10 nmax]]; a[n_] := If[n==0, 0, A033307[[4n^2 + n + 1]]]; Table[a[n], {n, 0, nmax}] (* _Jean-François Alcover_, Apr 24 2017, after _Andrew Woods_ *)
%Y A033988 Sequences based on the same spiral: A033953, A033989, A033990. Spiral without zero: A033952.
%Y A033988 Other sequences from spirals: A001107, A002939, A007742, A033951, A033954, A033991, A002943, A033996.
%Y A033988 Cf. A033307.
%K A033988 nonn,easy,base
%O A033988 0,2
%A A033988 _N. J. A. Sloane_
%E A033988 More terms from Andrew Gacek (andrew(AT)dgi.net)
%E A033988 Edited by _Jon E. Schoenfield_, Aug 12 2018