OFFSET
1,2
COMMENTS
T(n,k) is the number of sequences with repetition (k-tuples) of k (not necessarily different) elements taken from an n-set S. These sequences are also called "words of length k over the alphabet S". For sequences without repetition (partial permutations) cf. A068424. - Manfred Boergens, Jun 18 2023
FORMULA
T(n, k) = n^k, 1<=k<=n.
EXAMPLE
From Felix Fröhlich, Sep 15 2019: (Start)
Triangle begins:
1;
2, 4;
3, 9, 27;
4, 16, 64, 256;
5, 25, 125, 625, 3125;
6, 36, 216, 1296, 7776, 46656;
7, 49, 343, 2401, 16807, 117649, 823543;
8, 64, 512, 4096, 32768, 262144, 2097152, 16777216;
9, 81, 729, 6561, 59049, 531441, 4782969, 43046721, 387420489; (End)
PROG
(PARI) row(n) = for(k=1, n, print1(n^k, ", "))
trianglerows(n) = for(x=1, n, row(x); print(""))
/* Print initial 10 rows as follows: */
trianglerows(10) \\ Felix Fröhlich, Sep 15 2019
CROSSREFS
KEYWORD
AUTHOR
Amarnath Murthy, Sep 20 2002
EXTENSIONS
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003
More terms from Michel Marcus, Sep 15 2019
STATUS
approved