login
Sequence, read by rows, encoding an infinite sequence of diamond-shaped arrays of nonnegative integers (see example).
0

%I #24 Oct 15 2018 07:29:08

%S 0,0,0,1,0,0,0,0,1,0,0,1,2,1,0,0,1,0,0,0,0,1,0,0,1,2,1,0,0,1,2,3,2,1,

%T 0,0,1,2,1,0,0,1,0,0,0,0,1,0,0,1,2,1,0,0,1,2,3,2,1,0,0,1,2,3,4,3,2,1,

%U 0,0,1,2,3,2,1,0,0,1,2,1,0,0,1,0,0

%N Sequence, read by rows, encoding an infinite sequence of diamond-shaped arrays of nonnegative integers (see example).

%C The sum of each figure corresponds to A005900;

%C Figure 1:

%C 0 = 0;

%C Figure 2:

%C 0+0+1+0+0 = 1;

%C Figure 3:

%C 0+0+1+0+0+1+2+1+0+0+1+0+0 = 6;

%C Figure n:

%C 0+0+1+0+0+1+2+1+0+...+n+...0+1+2+1+0+0+1+0+0 = A005900(n).

%e Figure 1 has just 0. Figure 2 would look like a 1 surrounded by 0's. Figure 3 would look like a 2 surrounded by 1's surrounded by 0's, etc.

%e Read by rows, the sequence starts:

%e Figure 1: 0;

%e 0

%e Figure 2: 0, 0, 1, 0, 0;

%e 0

%e 0 1 0

%e 0

%e Figure 3: 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 1, 0, 0;

%e 0

%e 0 1 0

%e 0 1 2 1 0

%e 0 1 0

%e 0

%e Figure 4: 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0, 1, 2, 1, 0, 0, 1, 0, 0;

%e 0

%e 0 1 0

%e 0 1 2 1 0

%e 0 1 2 3 2 1 0

%e 0 1 2 1 0

%e 0 1 0

%e 0

%e ...

%t f[n_] := Join[#, Rest@ Reverse@ #] &@ Range[0, n]; Array[Flatten[f /@ f@ #] &, 5, 0] // Flatten (* _Michael De Vlieger_, Sep 10 2018 *)

%Y Cf. A001477, A005900.

%K nonn,tabf

%O 0,13

%A _Kritsada Moomuang_, Sep 09 2018