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.

This page as a plain text file.
%I A242357 #6 Oct 23 2020 15:56:17
%S A242357 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,
%T A242357 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,
%U A242357 2,1,1,2,3,4,5,6,7,8,8,8,8,8,8,8,8,7
%N A242357 Crescendo trapezoidal.
%C A242357 a(A000326(n)) = a(A143689(n-1)) = 1;
%C A242357 for all n: a(k) = n, A104249(n-1) <= k <= A005448(n).
%H A242357 Reinhard Zumkeller, <a href="/A242357/b242357.txt">Table of n, a(n) for n = 1..1001</a>
%e A242357 . Initial values
%e A242357 . seen trapezoidal:                                  666666
%e A242357 .                                    55555          5......5
%e A242357 .                       4444        4.....4        4........4
%e A242357 .             333      3....3      3.......3      3..........3
%e A242357 .      22    2...2    2......2    2.........2    2............2
%e A242357 .  1  1..1  1.....1  1........1  1...........1  1..............1 .
%t A242357 Table[Join[Range[n-1],PadRight[{},n,n],Range[n-1,1,-1]],{n,9}]//Flatten (* _Harvey P. Dale_, Oct 23 2020 *)
%o A242357 (Haskell)
%o A242357 import Data.List (inits)
%o A242357 a242357 n = a242357_list !! (n-1)
%o A242357 a242357_list = concatMap f $ tail $ inits [1..] where
%o A242357    f us = (init us) ++ (take v [v, v ..]) ++ vs
%o A242357           where (v:vs) = reverse us
%Y A242357 Cf. A004737.
%K A242357 nonn
%O A242357 1,3
%A A242357 _Reinhard Zumkeller_, May 11 2014