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.

Showing 1-2 of 2 results.

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 ]

A351192 Irregular table of positive integers read by rows; the n-th row contains a(n) 1's, a(n) 2's, ..., a(n) n's, in that order.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Feb 09 2022

Keywords

Comments

This sequence is a variant of A128117.
The sequence is well defined:
- the first row must start with a value 1, so a(1) = 1, and the first row is (1),
- the second row must start with a value 1, so a(2) = 1, and the second row is (1, 2),
- subsequent rows are determined by terms in prior rows.

Examples

			The first terms and rows are:
  n   a(n)  n-th row
  --  ----  ----------------------------------------
   1     1  1
   2     1  1, 2
   3     2  1, 1, 2, 2, 3, 3
   4     1  1, 2, 3, 4
   5     1  1, 2, 3, 4, 5
   6     2  1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6
   7     2  1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
		

Crossrefs

Programs

  • Maple
    a:= proc() local k, l: k, l:= 3, [1$2, 2];
          proc(n)
            while nops(l)Alois P. Heinz, Feb 13 2022
  • PARI
    a = vector(95, n, 1); m=0; for (n=1, 9, for (k=1, n, for (t=1, a[n], print1 (a[m++]=k", "))))
Showing 1-2 of 2 results.