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.

A257857 Sequentially filled binary triangle rotated 180 degrees and then superimposed and added to the original triangle.

Original entry on oeis.org

2, 1, 1, 0, 2, 0, 1, 1, 1, 1, 2, 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, 0, 2, 0, 2, 0, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 2, 0, 2
Offset: 1

Views

Author

Craig Knecht, Jul 12 2015

Keywords

Comments

The integers in the LINKS illustration hang like ornaments on a tree.

Examples

			Triangle T(n,k) begins:       Row sums
2;                                2
1,  1;                            2
0,  2,  0;                        2
1,  1,  1,  1;                    4
2,  0,  2,  0,  2;                6
1,  1,  1,  1,  1,  1;            6
0,  2,  0,  2,  0,  2,  0;        6
1,  1,  1,  1,  1,  1,  1,  1;    8
		

Crossrefs

For row sums for the three other variations of this build process, see A186421, A201629, A240828.

Programs

  • Maple
    A257857 := proc(n,k)
        if type(n,'even') then
            1 ;
        elif type((n+1)/2+k,'even') then
            2 ;
        else
            0;
        end if;
    end proc:

Formula

T(n,k)=1 if n even, 1<=k<=n.
T(n,k)=2 if n odd and (n+1)/2+k even, 1<=k<=n.
T(n,k)=0 if n odd and (n+1)/2+k odd, 1<=k<=n.