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.

A128118 At the n-th iteration the sequence of integers from n down to 1 are appended to the sequence a(n) times.

Original entry on oeis.org

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

Views

Author

Reed Kelly, Feb 15 2007

Keywords

Examples

			a(4) = 2 so 4,3,2,1,4,3,2,1 is added to the end of the sequence at the fourth iteration.
		

Crossrefs

Programs

  • Mathematica
    crr[n_] := Module[ { A = {1,2,1,2,1}, i, j }, For [ i = 3, i <= n, i++, A = Join[ A, Flatten[ Table[ Range[i,1,-1], {A[[i]]} ]]]; ]; A ]