login
Crescendo trapezoidal.
6

%I #6 Oct 23 2020 15:56:17

%S 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 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 2,1,1,2,3,4,5,6,7,8,8,8,8,8,8,8,8,7

%N Crescendo trapezoidal.

%C a(A000326(n)) = a(A143689(n-1)) = 1;

%C for all n: a(k) = n, A104249(n-1) <= k <= A005448(n).

%H Reinhard Zumkeller, <a href="/A242357/b242357.txt">Table of n, a(n) for n = 1..1001</a>

%e . Initial values

%e . seen trapezoidal: 666666

%e . 55555 5......5

%e . 4444 4.....4 4........4

%e . 333 3....3 3.......3 3..........3

%e . 22 2...2 2......2 2.........2 2............2

%e . 1 1..1 1.....1 1........1 1...........1 1..............1 .

%t Table[Join[Range[n-1],PadRight[{},n,n],Range[n-1,1,-1]],{n,9}]//Flatten (* _Harvey P. Dale_, Oct 23 2020 *)

%o (Haskell)

%o import Data.List (inits)

%o a242357 n = a242357_list !! (n-1)

%o a242357_list = concatMap f $ tail $ inits [1..] where

%o f us = (init us) ++ (take v [v, v ..]) ++ vs

%o where (v:vs) = reverse us

%Y Cf. A004737.

%K nonn

%O 1,3

%A _Reinhard Zumkeller_, May 11 2014