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.

A278703 Divide a full period sine wave into n equally spaced points along the x-axis, labeled 1 through n, from left to right. Rank the points according to their sine value and read by rows.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 4, 3, 2, 1, 4, 5, 3, 1, 2, 5, 6, 4, 3, 1, 2, 6, 5, 7, 4, 1, 3, 2, 7, 6, 8, 5, 4, 1, 3, 2, 7, 8, 6, 9, 5, 1, 4, 2, 3, 8, 9, 7, 10, 6, 5, 1, 4, 2, 3, 9, 8, 10, 7, 11, 6, 1, 5, 2, 4, 3, 10, 9, 11, 8, 12, 7, 6, 1, 5, 2, 4, 3, 10, 11, 9, 12, 8, 13, 7, 1, 6, 2, 5, 3, 4
Offset: 1

Views

Author

Robert G. Wilson v, Nov 26 2016

Keywords

Comments

Inspired by A276669.
Two other sequences in the same vein could be constructed, one with points from 0 to n-1 and the other with points from 0 to n. The latter would only insert a zero before n.
Column 1 appears to be A037915 and the last column appears to be A002265.

Examples

			Row  1:  1;
Row  2:  2,  1;
Row  3:  3,  2,  1;
Row  4:  4,  3,  2,  1;
Row  5:  4,  5,  3,  1,  2;
Row  6:  5,  6,  4,  3,  1,  2;
Row  7:  6,  5,  7,  4,  1,  3,  2;
Row  8:  7,  6,  8,  5,  4,  1,  3,  2;
Row  9:  7,  8,  6,  9,  5,  1,  4,  2,  3;
Row 10:  8,  9,  7, 10,  6,  5,  1,  4,  2,  3;
etc.
Row 3: The first point is (Pi/2, 1), the second point is (Pi,0) and the third point is (3*Pi/2, -1). Sorting by the Y value and reading the points by their index, we have 3, 2, 1.
Row 4: The first point is at (2*Pi/5, sqrt(5/8 + sqrt(5)/8)), point two is at (4*Pi/5, sqrt(5/8 - sqrt(5)/8)), point three is at (6*Pi/5, -sqrt(5/8 - sqrt(5)/8)) and point four is at (8*Pi/5, -sqrt(5/8 + sqrt(5)/8)). Sorting the point labels by their Y values in increasing order, we have 4, 3, 2, 1.
		

Crossrefs

Cf. A276669.

Programs

  • Mathematica
    f[n_] := Transpose[ Sort[ Table[{N[ Sin[ 2i*Pi/(n +1)], 9], i}, {i, n}]]][[2]]; Array[f, 13] // Flatten