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-6 of 6 results.

A202704 Constructed by the same rule as A185356 and A202690, but with first row 0, 1.

Original entry on oeis.org

0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 2, 3, 3, 4, 5, 5, 23, 23, 22, 20, 17, 17, 14, 10, 5, 0, 0, 23, 46, 68, 88, 105, 105, 122, 136, 146, 151, 151, 1141, 1141, 1118, 1072, 1004, 916, 811, 811, 706, 584, 448, 302, 151, 0
Offset: 1

Views

Author

N. J. A. Sloane, Dec 23 2011

Keywords

Comments

Equals A202690 - A202691.

Examples

			Triangle begins
                   0 1
               0   0 0   1
            1  1   1 1   1   0
         0  1  2   3 3   4   5   5
     23 23 22 20  17 17  14  10  5   0
   0 23 46 68 88 105 105 122 136 146 151 151
		

Crossrefs

Programs

  • PARI
    T(n,k) = {if ((k==0), return(0)); if (n==1, if (abs(k)==1, if (k>0, return(1), return (0)))); if (n%2, if (k<0, sum(j=k+1, n-1, T(n-1,j)), sum(j=k, n-1, T(n-1,j))), if (k<0, sum(j=-n+1, k, T(n-1,j)), sum(j=-n+1, k-1, T(n-1,j))));}
    tabf(nn) = {for (n=1, nn, for (k=-n, n, if (k, print1(T(n, k), ", "));); print;);} \\ Michel Marcus, Jun 03 2020

Extensions

More terms from Michel Marcus, Jun 03 2020

A202815 The right-hand half-triangle of A185356 (or A202690).

Original entry on oeis.org

1, 1, 2, 3, 2, 0, 11, 14, 16, 16, 57, 46, 32, 16, 0, 361, 418, 464, 496, 512, 512, 2763, 2402, 1984, 1520, 1024, 512, 0, 24611, 27374, 29776, 31760, 33280, 34304, 34816, 34816, 250737, 226126, 198752, 168976, 137216, 103936, 69632, 34816, 0
Offset: 1

Views

Author

N. J. A. Sloane, Dec 25 2011

Keywords

Examples

			Triangle begins:
    1
    1   2
    3   2   0
   11  14  16  16
   57  46  32  16   0
  361 418 464 496 512 512
  ...
		

Crossrefs

Programs

  • PARI
    T(n,k) = {if ((k==0), return(0)); if (n==1, if (abs(k)==1, return(1))); if (n%2, if (k<0, sum(j=k+1, n-1, T(n-1,j)), sum(j=k, n-1, T(n-1,j))), if (k<0, sum(j=-n+1, k, T(n-1,j)), sum(j=-n+1, k-1, T(n-1,j))));}
    tabl(nn) = {for (n=1, nn, for (k=1, n, if (k, print1(T(n, k), ", "));); print;);} \\ Michel Marcus, Jun 03 2020

Extensions

More terms from Michel Marcus, Jun 03 2020

A202816 The left-hand half-triangle of A185356 (or A202690).

Original entry on oeis.org

1, 1, 0, 3, 4, 4, 11, 8, 4, 0, 57, 68, 76, 80, 80, 361, 304, 236, 160, 80, 0, 2763, 3124, 3428, 3664, 3824, 3904, 3904, 24611, 21848, 18724, 15296, 11632, 7808, 3904, 0, 250737, 275348, 297196, 315920, 331216, 342848, 350656, 354560, 354560
Offset: 1

Views

Author

N. J. A. Sloane, Dec 25 2011

Keywords

Examples

			Triangle begins:
    1
    1   0
    3   4   4
   11   8   4   0
   57  68  76  80 80
  361 304 236 160 80 0
  ...
		

Crossrefs

Programs

  • PARI
    T(n,k) = {if ((k==0), return(0)); if (n==1, if (abs(k)==1, return(1))); if (n%2, if (k<0, sum(j=k+1, n-1, T(n-1,j)), sum(j=k, n-1, T(n-1,j))), if (k<0, sum(j=-n+1, k, T(n-1,j)), sum(j=-n+1, k-1, T(n-1,j))));}
    tabl(nn) = {for (n=1, nn, for (k=1, n, if (k, print1(T(n, -k), ", "));); print;);} \\ Michel Marcus, Jun 03 2020

Extensions

More terms from Michel Marcus, Jun 03 2020

A185356 Triangle read by rows: number of type B alternating permutations according to their last value.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 1, 2, 4, 4, 3, 0, 3, 2, 0, 0, 4, 8, 11, 0, 11, 14, 16, 16, 80, 80, 76, 68, 57, 0, 57, 46, 32, 16, 0, 0, 80, 160, 236, 304, 361, 0, 361, 418, 464, 496, 512, 512, 3904, 3904, 3824, 3664, 3428, 3124, 2763, 0, 2763, 2402, 1984, 1520, 1024, 512, 0
Offset: 0

Views

Author

N. J. A. Sloane, Dec 22 2011

Keywords

Comments

"The table counting type B alternating permutations by their last value is obtained by the following algorithm: first separate the picture by the column p = 0 and then compute two triangles. Put 1 at the top of each triangle and compute the rest as follows: fill the second row of the left (resp. right) triangle as the sum of the elements of the first row (resp. strictly) to their left. Then fill the third row of the right (resp. left) triangle as the sum of the elements of the previous row (resp. strictly) to their right. Compute all rows successively by reading from left to right and right to left alternately." [Joshua-Verges et al.]

Examples

			Triangle begins:
                       0
                     1 0 1
                 0   1 0 1   2
             4   4   3 0 3   2   0
         0   4   8  11 0 11  14  16  16
    80  80  76  68  57 0 57  46  32  16  0
  0 80 160 236 304 361 0 361 418 464 496 512 512
		

Crossrefs

See A202690 for another version.
See A010094 and A008281 for type A permutations.
Cf. A000831 (row sums, for n>0).
Cf. A001586 for the middle coefficients.

Programs

  • PARI
    T(n,k) = {if ((k==0), return(0)); if (n==1, if (abs(k)==1, return(1))); if (n%2, if (k<0, sum(j=k+1, n-1, T(n-1,j)), sum(j=k, n-1, T(n-1,j))), if (k<0, sum(j=-n+1, k, T(n-1,j)), sum(j=-n+1, k-1, T(n-1,j))));}
    tabf(nn) = {for (n=0, nn, for (k=-n, n, print1(T(n, k), ", ");); print;);} \\ Michel Marcus, Jun 03 2020

Extensions

More terms from Michel Marcus, Jun 03 2020

A202691 Triangle read by rows: number of type B snakes according to their last value.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 3, 3, 2, 2, 1, 0, 0, 3, 6, 8, 8, 10, 11, 11, 57, 57, 54, 48, 40, 40, 32, 22, 11, 0, 0, 57, 114, 168, 216, 256, 256, 296, 328, 350, 361, 361
Offset: 1

Views

Author

N. J. A. Sloane, Dec 22 2011

Keywords

Comments

"The table counting snakes of type B by their last value is obtained by the following algorithm: first separate the picture by the column p = 0 and then compute two triangles. Put 1 at the top of the left triangle and 0 at the top of the right one and compute the rest as follows: fill the second row of the left (resp. right) triangle as the sum of the elements of the first row (resp. strictly) to their left. Then fill the third row of the right (resp. left) triangle as the sum of the elements of the previous row (resp. strictly) to their right. Compute all rows successively by reading from left to right and right to left alternately." [Joshuat-Verges et al.]

Examples

			Triangle begins:
                   1 0
                 0 1 1 1
               3 3 2 2 1 0
             0 3 6 8 8 10 11 11
      57 57 54 48 40 40 32 22 11 0
0 57 114 168 216 256 256 296 328 350 361 361
		

Crossrefs

A335335 Irregular triangle T(n,k) of Arnold numbers with n>=1 and 1<= abs(k) <= n.

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 0, 2, 3, 3, 4, 4, 0, 4, 8, 11, 11, 14, 16, 16, 0, 16, 32, 46, 57, 57, 68, 76, 80, 80, 0, 80, 160, 236, 304, 361, 361, 418, 464, 496, 512, 512, 0, 512, 1024, 1520, 1984, 2402, 2763, 2763, 3124, 3428, 3664, 3824, 3904, 3904, 0, 3904, 7808, 11632, 15296, 18724, 21848, 24611, 24611, 27374, 29776, 31760, 33280, 34304, 34816, 34816
Offset: 1

Views

Author

Michel Marcus, Jun 02 2020

Keywords

Examples

			Triangle begins:
                        1,   1,
                   0,   1,   1,   2,
              0,   2,   3,   3,   4,   4,
         0,   4,   8,  11,  11,  14,  16,  16,
    0,  16,  32,  46,  57,  57,  68,  76,  80,  80,
0, 80, 160, 236, 304, 361, 361, 418, 464, 496, 512, 512,
		

Crossrefs

Cf. A001586 (row sums).

Programs

  • PARI
    T(n, k) = {if ((n==1) && (k==1), return (1)); if ((n+k) == 0, if (n==1, return(1), return (0))); if ((n>=k) && (k>1), return(T(n, k-1) + T(n-1, 1-k))); if ((k==1) && (n>k), return(T(n,-1))); if ((-1>=k) && (k>=-n), return(T(n, k-1) + T(n-1, -k)));}
    tabf(nn) = {for (n=1, nn, for (k=-n, -1, print1(T(n,k), ", ");); for (k=1, n, print1(T(n,k), ", ");); print;);}

Formula

T(n,k) is defined by T(1,1) = T(1,-1) = 1, T(n,-n) = 0 (n >= 2), and the recurrence
T(n,k) = T(n,k-1) + T(n-1,-k+1) if n >= k > 1,
T(n,k) = T(n,-1) if n > k = 1,
T(n,k) = T(n,k-1) + T(n-1,-k) if -1 >= k > -n.
Showing 1-6 of 6 results.