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.

Showing 1-2 of 2 results.

A106242 Same triangle as A106243, but with rows read in boustrophedon manner, i.e., in the order in which they were created.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 3, 3, 0, 6, 11, 13, 13, 0, 26, 50, 67, 73, 73, 0, 146, 286, 403, 479, 505, 505, 0, 1010, 1994, 2876, 3565, 3997, 4143, 4143, 0, 8286, 16426, 23988, 30429, 35299, 38303, 39313, 39313, 0, 78626, 156242, 229844, 295572, 349989, 390403, 415115, 423401, 423401
Offset: 0

Views

Author

N. J. A. Sloane, May 29 2005

Keywords

Crossrefs

Right-hand diagonal is A059294. Cf. A106243. Row sums give A106327.

Programs

  • Maple
    T:= proc(n, k) option remember;
          local t;
          if n<1 or k<1 then 0
        elif n=1 and k=1 then 1
        elif n=1 and irem(k, 2)=1 or k=1 and irem(n, 2)=0 then 0
        else t:= 1-2*irem(n+k, 2);
                 T(n-t, k+t) + T(n, k-1)+T(n-1, k)
          fi
        end:
    seq (`if` (irem(d, 2)=1,
      seq (T(d-k, k), k=1..d-1),
      seq (T(n, d-n), n=1..d-1)), d=2..11);  # Alois P. Heinz, Feb 08 2011
  • Mathematica
    T[n_, k_] := T[n, k] = Module[{t}, Which[n<1 || k<1, 0, n == 1 && k == 1, 1, n == 1 && Mod[k, 2] == 1 || k == 1 && Mod[n, 2] == 0, 0, True, t = 1 - 2*Mod[n+k, 2]; T[n-t, k+t] + T[n, k-1] + T[n-1, k]]]; Table[If[Mod[d, 2] == 1, Table[T[d-k, k], {k, 1, d-1}], Table[T[n, d-n], {n, 1, d-1}]], {d, 2, 11}] // Flatten (* Jean-François Alcover, Jan 14 2014, translated from Alois P. Heinz's Maple code *)

Extensions

More terms from Alois P. Heinz, Feb 08 2011

A106243 Triangle read by rows from left to right. However, triangle is constructed in the boustrophedon way, reading alternately right to left and left to right. Top entry is 1. In all later rows, initial entry is 0, other entries are sum of previous entry in that row plus sum of two entries above it in previous row.

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 0, 2, 3, 3, 13, 13, 11, 6, 0, 0, 26, 50, 67, 73, 73, 505, 505, 479, 403, 286, 146, 0, 0, 1010, 1994, 2876, 3565, 3997, 4143, 4143, 39313, 39313, 38303, 35299, 30429, 23988, 16426, 8286, 0, 0, 78626, 156242, 229844, 295572, 349989, 390403
Offset: 0

Views

Author

N. J. A. Sloane, May 29 2005

Keywords

Examples

			Triangle begins:
            1
          0   1
        1   1   0
      0   2   3   3
   13  13  11   6   0   (e.g., 11 = 6 + 3 + 2)
  0  26  50  67  73  73 (e.g., 50 = 26 + 13 + 11)
		

Crossrefs

Cf. A007318, A008280, A008281, A106242. The row ends give A059294. Row sums give A106327.

Programs

  • Maple
    T[0,0]:=1: for n from 0 to 12 do T[n,-1]:=0 od: for n from 0 to 12 do T[n,n+1]:=0 od: for n from 1 by 2 to 12 do T[n,0]:=0: for k from 1 to n do T[n,k]:=T[n,k-1]+T[n-1,k]+T[n-1,k-1] od: T[n+1,n+1]:=0: for j from 1 to n+1 do T[n+1,n+1-j]:=T[n+1,n+2-j]+T[n,n+1-j]+T[n,n-j] od: od: for n from 0 to 9 do seq(T[n,k],k=0..n) od; # yields sequence in triangular form; not necessarily the best Maple program # Emeric Deutsch, Aug 03 2005

Extensions

More terms from Emeric Deutsch, Aug 03 2005
Showing 1-2 of 2 results.