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.

A242357 Crescendo trapezoidal.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 11 2014

Keywords

Comments

a(A000326(n)) = a(A143689(n-1)) = 1;
for all n: a(k) = n, A104249(n-1) <= k <= A005448(n).

Examples

			. Initial values
. seen trapezoidal:                                  666666
.                                    55555          5......5
.                       4444        4.....4        4........4
.             333      3....3      3.......3      3..........3
.      22    2...2    2......2    2.........2    2............2
.  1  1..1  1.....1  1........1  1...........1  1..............1 .
		

Crossrefs

Cf. A004737.

Programs

  • Haskell
    import Data.List (inits)
    a242357 n = a242357_list !! (n-1)
    a242357_list = concatMap f $ tail $ inits [1..] where
       f us = (init us) ++ (take v [v, v ..]) ++ vs
              where (v:vs) = reverse us
  • Mathematica
    Table[Join[Range[n-1],PadRight[{},n,n],Range[n-1,1,-1]],{n,9}]//Flatten (* Harvey P. Dale, Oct 23 2020 *)