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.

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.