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-10 of 23 results. Next

A000400 Powers of 6: a(n) = 6^n.

Original entry on oeis.org

1, 6, 36, 216, 1296, 7776, 46656, 279936, 1679616, 10077696, 60466176, 362797056, 2176782336, 13060694016, 78364164096, 470184984576, 2821109907456, 16926659444736, 101559956668416, 609359740010496, 3656158440062976, 21936950640377856, 131621703842267136
Offset: 0

Views

Author

Keywords

Comments

Same as Pisot sequences E(1, 6), L(1, 6), P(1, 6), T(1, 6). Essentially same as Pisot sequences E(6, 36), L(6, 36), P(6, 36), T(6, 36). See A008776 for definitions of Pisot sequences.
Central terms of the triangle in A036561. - Reinhard Zumkeller, May 14 2006
a(n) = A169604(n)/3; a(n+1) = 2*A169604(n). - Reinhard Zumkeller, May 02 2010
Number of pentagons contained within pentaflakes. - William A. Tedeschi, Sep 12 2010
Sum of coefficients of expansion of (1 + x + x^2 + x^3 + x^4 + x^5)^n.
a(n) is number of compositions of natural numbers into n parts less than 6. For example, a(2) = 36, and there are 36 compositions of natural numbers into 2 parts less than 6.
The compositions of n in which each part is colored by one of p different colors are called p-colored compositions of n. For n >= 1, a(n) equals the number of 5-colored compositions of n such that no adjacent parts have the same color.
Number of words of length n over the alphabet of six letters. - Joerg Arndt, Sep 16 2014
The number of ordered triples (x, y, z) of binary words of length n such that D(x,z) = D(x, y) + D(y, z) where D(a, b) is the Hamming distance from a to b. - Geoffrey Critzer, Mar 06 2017
a(n) is the area of a triangle with vertices at (2^n, 3^n), (2^(n+1), 3^(n+1)), and (2^(n+2), 3^(n+2)); a(n) is also one fifth the area of a triangle with vertices at (2^n, 3^(n+2)), (2^(n+1), 3^(n+1)), and (2^(n+2), 3^n). - J. M. Bergot, May 07 2018
a(n) is the number of possible outcomes of n distinguishable 6-sided dice. - Stefano Spezia, Jul 06 2024

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 86.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column 3 of A225816.
Row 6 of A003992.
Row 3 of A329332.

Programs

Formula

a(n) = 6^n.
a(0) = 1; a(n) = 6*a(n-1).
G.f.: 1/(1-6*x). - Simon Plouffe in his 1992 dissertation.
E.g.f.: exp(6*x).
A000005(a(n)) = A000290(n+1). - Reinhard Zumkeller, Mar 04 2007
a(n) = A159991(n)/A011577(n). - Reinhard Zumkeller, May 02 2009
a(n) = det(|s(i+3,j)|, 1 <= i,j <= n), where s(n,k) are Stirling numbers of the first kind. - Mircea Merca, Apr 04 2013

A026898 a(n) = Sum_{k=0..n} (n-k+1)^k.

Original entry on oeis.org

1, 2, 4, 9, 23, 66, 210, 733, 2781, 11378, 49864, 232769, 1151915, 6018786, 33087206, 190780213, 1150653921, 7241710930, 47454745804, 323154696185, 2282779990495, 16700904488706, 126356632390298, 987303454928973, 7957133905608837, 66071772829247410
Offset: 0

Views

Author

Keywords

Comments

Row sums of A004248, A009998, A009999.
First differences are in A047970.
First differences of A103439.
Antidiagonal sums of array A003992.
a(n-1), for n>=1, is the number of length-n restricted growth strings (RGS) [s(0),s(1),...,s(n-1)] where s(0)=0 and s(k)<=1+max(prefix) for k>=1, that are simultaneously projections as maps f: [n] -> [n] where f(x)<=x and f(f(x))=f(x); see example and the two comments (Arndt, Apr 30 2011 Jan 04 2013) in A000110. - Joerg Arndt, Mar 07 2015
Number of finite sequences s of length n+1 whose discriminator sequence is s itself. Here the discriminator sequence of s is the one where the n-th term (n>=1) is the least positive integer k such that the first n terms are pairwise incongruent, modulo k. - Jeffrey Shallit, May 17 2016
From Gus Wiseman, Jan 08 2019: (Start)
Also the number of set partitions of {1,...,n+1} whose minima form an initial interval of positive integers. For example, the a(3) = 9 set partitions are:
{{1},{2},{3},{4}}
{{1},{2},{3,4}}
{{1},{2,4},{3}}
{{1,4},{2},{3}}
{{1},{2,3,4}}
{{1,3},{2,4}}
{{1,4},{2,3}}
{{1,3,4},{2}}
{{1,2,3,4}}
Missing from this list are:
{{1},{2,3},{4}}
{{1,2},{3},{4}}
{{1,3},{2},{4}}
{{1,2},{3,4}}
{{1,2,3},{4}}
{{1,2,4},{3}}
(End)
a(n) is the number of m-tuples of nonnegative integers less than or equal to n-m (including the "0-tuple"). - Mathew Englander, Apr 11 2021

Examples

			G.f.: A(x) = 1 + 2*x + 4*x^2 + 9*x^3 + 23*x^4 + 66*x^5 + 210*x^6 + ...
where we have the identity:
A(x) = 1/(1-x) + x/(1-2*x) + x^2/(1-3*x) + x^3/(1-4*x) + x^4/(1-5*x) + ...
is equal to
A(x) = 1/(1-x) + x/((1-x)^2*(1+x)) + 2!*x^2/((1-x)^3*(1+x)*(1+2*x)) + 3!*x^3/((1-x)^4*(1+x)*(1+2*x)*(1+3*x)) + 4!*x^4/((1-x)^5*(1+x)*(1+2*x)*(1+3*x)*(1+4*x)) + ...
From _Joerg Arndt_, Mar 07 2015: (Start)
The a(5-1) = 23 RGS described in the comment are (dots denote zeros):
01:  [ . . . . . ]
02:  [ . 1 . . . ]
03:  [ . 1 . . 1 ]
04:  [ . 1 . 1 . ]
05:  [ . 1 . 1 1 ]
06:  [ . 1 1 . . ]
07:  [ . 1 1 . 1 ]
08:  [ . 1 1 1 . ]
09:  [ . 1 1 1 1 ]
10:  [ . 1 2 . . ]
11:  [ . 1 2 . 1 ]
12:  [ . 1 2 . 2 ]
13:  [ . 1 2 1 . ]
14:  [ . 1 2 1 1 ]
15:  [ . 1 2 1 2 ]
16:  [ . 1 2 2 . ]
17:  [ . 1 2 2 1 ]
18:  [ . 1 2 2 2 ]
19:  [ . 1 2 3 . ]
20:  [ . 1 2 3 1 ]
21:  [ . 1 2 3 2 ]
22:  [ . 1 2 3 3 ]
23:  [ . 1 2 3 4 ]
(End)
		

Crossrefs

Programs

  • Haskell
    a026898 n = sum $ zipWith (^) [n + 1, n .. 1] [0 ..]
    -- Reinhard Zumkeller, Sep 14 2014
    
  • Magma
    [(&+[(n-k+1)^k: k in [0..n]]): n in [0..50]]; // Stefano Spezia, Jan 09 2019
    
  • Maple
    a:= n-> add((n+1-j)^j, j=0..n): seq(a(n), n=0..23); # Zerinvary Lajos, Apr 18 2009
  • Mathematica
    Table[Sum[(n-k+1)^k, {k,0,n}], {n, 0, 25}] (* Michael De Vlieger, Apr 01 2015 *)
  • PARI
    {a(n)=polcoeff(sum(m=0,n,x^m/(1-(m+1)*x+x*O(x^n))),n)} /* Paul D. Hanna, Sep 13 2011 */
    
  • PARI
    {INTEGRATE(n,F)=local(G=F);for(i=1,n,G=intformal(G));G}
    {a(n)=local(A=1+x);A=sum(k=0,n,INTEGRATE(k,exp((k+1)*x+x*O(x^n))));n!*polcoeff(A,n)} \\ Paul D. Hanna, Dec 28 2013
    for(n=0,30,print1(a(n),", "))
    
  • PARI
    {a(n)=polcoeff( sum(m=0, n, m!*x^m/(1-x +x*O(x^n))^(m+1)/prod(k=1, m, 1+k*x +x*O(x^n))), n)}  /* From o.g.f. (Paul D. Hanna, Jul 20 2014) */
    for(n=0, 25, print1(a(n), ", "))
    
  • Sage
    [sum((n-j+1)^j for j in (0..n)) for n in (0..30)] # G. C. Greubel, Jun 15 2021

Formula

a(n) = A003101(n) + 1.
G.f.: Sum_{n>=0} x^n/(1 - (n+1)*x). - Paul D. Hanna, Sep 13 2011
G.f.: G(0) where G(k) = 1 + x*(2*k*x-1)/((2*k*x+x-1) - x*(2*k*x+x-1)^2/(x*(2*k*x+x-1) + (2*k*x+2*x-1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 26 2013
E.g.f.: Sum_{n>=0} Integral^n exp((n+1)*x) dx^n, where Integral^n F(x) dx^n is the n-th integration of F(x) with no constant of integration. - Paul D. Hanna, Dec 28 2013
O.g.f.: Sum_{n>=0} n! * x^n/(1-x)^(n+1) / Product_{k=1..n} (1 + k*x). - Paul D. Hanna, Jul 20 2014
a(n) = A101494(n+1,0). - Vladimir Kruchinin, Apr 01 2015
a(n-1) = Sum_{k = 1..n} k^(n-k). - Gus Wiseman, Jan 08 2019
log(a(n)) ~ (1 - 1/LambertW(exp(1)*n)) * n * log(1 + n/LambertW(exp(1)*n)). - Vaclav Kotesovec, Jun 15 2021
a(n) ~ sqrt(2*Pi/(n+1 + (n+1)/w(n))) * ((n+1)/w(n))^(n+2 - (n+1)/w(n)), where w(n) = LambertW(exp(1)*(n+1)). - Vaclav Kotesovec, Jun 25 2021, after user "leonbloy", see Mathematics Stack Exchange link.

Extensions

a(23)-a(25) from Paul D. Hanna, Dec 28 2013

A277504 Array read by descending antidiagonals: T(n,k) is the number of unoriented strings with n beads of k or fewer colors.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 3, 1, 0, 1, 4, 6, 6, 1, 0, 1, 5, 10, 18, 10, 1, 0, 1, 6, 15, 40, 45, 20, 1, 0, 1, 7, 21, 75, 136, 135, 36, 1, 0, 1, 8, 28, 126, 325, 544, 378, 72, 1, 0, 1, 9, 36, 196, 666, 1625, 2080, 1134, 136, 1, 0, 1, 10, 45, 288, 1225, 3996, 7875, 8320, 3321, 272, 1, 0
Offset: 0

Views

Author

Jean-François Alcover, Oct 18 2016

Keywords

Comments

From Petros Hadjicostas, Jul 07 2018: (Start)
Column k of this array is the "BIK" (reversible, indistinct, unlabeled) transform of k,0,0,0,....
Consider the input sequence (c_k(n): n >= 1) with g.f. C_k(x) = Sum_{n>=1} c_k(n)*x^n. Let a_k(n) = BIK(c_k(n): n >= 1) be the output sequence under Bower's BIK transform. It can proved that the g.f. of BIK(c_k(n): n >= 1) is A_k(x) = (1/2)*(C_k(x)/(1-C_k(x)) + (C_k(x^2) + C_k(x))/(1-C_k(x^2))). (See the comments for sequence A001224.)
For column k of this two-dimensional array, the input sequence is defined by c_k(1) = k and c_k(n) = 0 for n >= 1. Thus, C_k(x) = k*x, and hence the g.f. of column k is (1/2)*(C_k(x)/(1-C_k(x)) + (C_k(x^2) + C_k(x))/(1-C_k(x^2))) = (1/2)*(k*x/(1-k*x) + (k*x^2 + k*x)/(1-k*x^2)) = (2 + (1-k)*x - 2*k*x^2)*k*x/(2*(1-k*x^2)*(1-k*x)).
Using the first form the g.f. above and the expansion 1/(1-y) = 1 + y + y^2 + ..., we can easily prove J.-F. Alcover's formula T(n,k) = (k^n + k^((n + mod(n,2))/2))/2.
(End)

Examples

			Array begins with T(0,0):
1 1   1     1      1       1        1         1         1          1 ...
0 1   2     3      4       5        6         7         8          9 ...
0 1   3     6     10      15       21        28        36         45 ...
0 1   6    18     40      75      126       196       288        405 ...
0 1  10    45    136     325      666      1225      2080       3321 ...
0 1  20   135    544    1625     3996      8575     16640      29889 ...
0 1  36   378   2080    7875    23436     58996    131328     266085 ...
0 1  72  1134   8320   39375   140616    412972   1050624    2394765 ...
0 1 136  3321  32896  195625   840456   2883601   8390656   21526641 ...
0 1 272  9963 131584  978125  5042736  20185207  67125248  193739769 ...
0 1 528 29646 524800 4884375 30236976 141246028 536887296 1743421725 ...
...
		

References

Crossrefs

Columns 0-6 are A000007, A000012, A005418(n+1), A032120, A032121, A032122, A056308.
Rows 0-20 are A000012, A001477, A000217 (triangular numbers), A002411 (pentagonal pyramidal numbers), A037270, A168178, A071232, A168194, A071231, A168372, A071236, A168627, A071235, A168663, A168664, A170779, A170780, A170790, A170791, A170801, A170802.
Main diagonal is A275549.
Transpose is A284979.
Cf. A003992 (oriented), A293500 (chiral), A321391 (achiral).

Programs

  • Magma
    [[n le 0 select 1 else ((n-k)^k + (n-k)^Ceiling(k/2))/2: k in [0..n]]: n in [0..15]]; // G. C. Greubel, Nov 15 2018
  • Mathematica
    Table[If[n>0, ((n-k)^k + (n-k)^Ceiling[k/2])/2, 1], {n, 0, 15}, {k, 0, n}] // Flatten (* updated Jul 10 2018 *) (* Adapted to T(0,k)=1 by Robert A. Russell, Nov 13 2018 *)
  • PARI
    for(n=0,15, for(k=0,n, print1(if(n==0,1, ((n-k)^k + (n-k)^ceil(k/2))/2), ", "))) \\ G. C. Greubel, Nov 15 2018
    
  • PARI
    T(n,k) = {(k^n + k^ceil(n/2)) / 2} \\ Andrew Howroyd, Sep 13 2019
    

Formula

T(n,k) = [n==0] + [n>0] * (k^n + k^ceiling(n/2)) / 2. [Adapted to T(0,k)=1 by Robert A. Russell, Nov 13 2018]
G.f. for column k: (1 - binomial(k+1,2)*x^2) / ((1-k*x)*(1-k*x^2)). - Petros Hadjicostas, Jul 07 2018 [Adapted to T(0,k)=1 by Robert A. Russell, Nov 13 2018]
From Robert A. Russell, Nov 13 2018: (Start)
T(n,k) = (A003992(k,n) + A321391(n,k)) / 2.
T(n,k) = A003992(k,n) - A293500(n,k) = A293500(n,k) + A321391(n,k).
G.f. for row n: (Sum_{j=0..n} S2(n,j)*j!*x^j/(1-x)^(j+1) + Sum_{j=0..ceiling(n/2)} S2(ceiling(n/2),j)*j!*x^j/(1-x)^(j+1)) / 2, where S2 is the Stirling subset number A008277.
G.f. for row n>0: x*Sum_{k=0..n-1} A145882(n,k) * x^k / (1-x)^(n+1).
E.g.f. for row n: (Sum_{k=0..n} S2(n,k)*x^k + Sum_{k=0..ceiling(n/2)} S2(ceiling(n/2),k)*x^k) * exp(x) / 2, where S2 is the Stirling subset number A008277.
T(0,k) = 1; T(1,k) = k; T(2,k) = binomial(k+1,2); for n>2, T(n,k) = k*(T(n-3,k)+T(n-2,k)-k*T(n-1,k)).
For k>n, T(n,k) = Sum_{j=1..n+1} -binomial(j-n-2,j) * T(n,k-j). (End)

Extensions

Array transposed for greater consistency by Andrew Howroyd, Apr 04 2017
Origin changed to T(0,0) by Robert A. Russell, Nov 13 2018

A004248 Array read by ascending antidiagonals: A(n, k) = k^n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 4, 3, 1, 0, 1, 8, 9, 4, 1, 0, 1, 16, 27, 16, 5, 1, 0, 1, 32, 81, 64, 25, 6, 1, 0, 1, 64, 243, 256, 125, 36, 7, 1, 0, 1, 128, 729, 1024, 625, 216, 49, 8, 1, 0, 1, 256, 2187, 4096, 3125, 1296, 343, 64, 9, 1, 0, 1, 512, 6561, 16384, 15625, 7776, 2401, 512, 81, 10, 1
Offset: 0

Views

Author

Keywords

Comments

This array transforms into A371761 using the Akiyama-Tanigawa algorithm for powers applied to the rows. - Peter Luschny, Apr 16 2024
This array transforms into A344499 using the Akiyama-Tanigawa algorithm for powers applied to the columns. - Peter Luschny, Apr 27 2024

Examples

			Seen as an array that is read by ascending antidiagonals:
[0] 1, 1,   1,    1,     1,     1,      1,      1,       1, ...
[1] 0, 1,   2,    3,     4,     5,      6,      7,       8, ...
[2] 0, 1,   4,    9,    16,    25,     36,     49,      64, ...
[3] 0, 1,   8,   27,    64,   125,    216,    343,     512, ...
[4] 0, 1,  16,   81,   256,   625,   1296,   2401,    4096, ...
[5] 0, 1,  32,  243,  1024,  3125,   7776,  16807,   32768, ...
[6] 0, 1,  64,  729,  4096, 15625,  46656, 117649,  262144, ...
[7] 0, 1, 128, 2187, 16384, 78125, 279936, 823543, 2097152, ...
		

Crossrefs

For other versions see A051129 and A009998.
Row sums are A026898, diagonal sums are A104872. [Paul Barry, Mar 28 2005]

Programs

  • Mathematica
    T[x_, y_] := If[y == 0, 1, (x - y)^y];
    Table[T[x, y], {x, 0, 11}, {y, x, 0, -1}] // Flatten (* Jean-François Alcover, Dec 15 2017 *)
  • PARI
    T(x, y) = x^y \\ Charles R Greathouse IV, Feb 07 2017
    
  • SageMath
    def Arow(n, len): return [k**n for k in range(len)]
    for n in range(8): print([n], Arow(n, 9))  # Peter Luschny, Apr 16 2024

Formula

Table of x^y, where (x,y) = (0,0), (0,1), (1,0), (0,2), (1,1), (2,0), ...
As a number triangle, columns have g.f. x^k/(1 - kx). - Paul Barry, Mar 28 2005
From Paul Barry, Jul 13 2005: (Start)
T(n, k) = if(k <= n, k^(n - k), 0).
T(n, k) = Sum_{j=0..floor((n-k)/2)} (-1)^j*C(n-k, j)*C(n-k-j, n-k)*k^(n-k-2j).
(End)

Extensions

New name by Peter Luschny, Apr 16 2024.

A051129 Table T(n,k) = k^n read by upwards antidiagonals (n >= 1, k >= 1).

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 1, 8, 9, 4, 1, 16, 27, 16, 5, 1, 32, 81, 64, 25, 6, 1, 64, 243, 256, 125, 36, 7, 1, 128, 729, 1024, 625, 216, 49, 8, 1, 256, 2187, 4096, 3125, 1296, 343, 64, 9, 1, 512, 6561, 16384, 15625, 7776, 2401, 512, 81, 10, 1, 1024, 19683, 65536, 78125, 46656, 16807, 4096, 729, 100, 11
Offset: 1

Views

Author

Keywords

Comments

(n-th term) = (n-th term of A002260)^(n-th term of A004736). Both A002260 and A004736 are related to A002024. - Robert A. Stump (bee_ess107(AT)yahoo.com), Aug 29 2002

Examples

			  1   2       3       4       5       6       7
  1   4       9      16      25      36      49
  1   8      27      64     125     216     343
  1  16      81     256     625    1296    2401
  1  32     243    1024    3125    7776   16807
  1  64     729    4096   15625   46656  117649
  1 128    2187   16384   78125  279936  823543
		

Crossrefs

Cf. A051128 (transposed), A003992 (transposed), A004248.
Cf. A002260, A003101 (antidiagonal sums), A000169 (central terms), A003320 (row maxima), A247358 (sorted rows).

Programs

  • Haskell
    a051129 n k = k ^ (n - k)
    a051129_row n = a051129_tabl !! (n-1)
    a051129_tabl = zipWith (zipWith (^)) a002260_tabl $ map reverse a002260_tabl
    -- Reinhard Zumkeller, Sep 14 2014
    
  • Maple
    T:= (n, k)-> k^n:
    seq(seq(T(1+d-k, k), k=1..d), d=1..11);  # Alois P. Heinz, Apr 18 2020
  • Mathematica
    Table[ k^(n-k+1), {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 30 2012 *)
  • PARI
    b(n) = floor(1/2 + sqrt(2 * n));
    vector(100, n, (n - b(n) * (b(n) - 1) / 2)^(b(n) * (b(n) + 1) / 2 - n + 1)) \\ Altug Alkan, Dec 09 2015

Formula

a(n) = (n - b(n) * (b(n) - 1) / 2)^(b(n) * (b(n) + 1) / 2 - n + 1), where b(n) = [ 1/2 + sqrt(2 * n) ]. (b(n) is the n-th term of A002024.) - Robert A. Stump (bee_ess107(AT)yahoo.com), Aug 29 2002

Extensions

More terms from James Sellers, Dec 11 1999

A051128 Table T(n,k) = n^k read by upwards antidiagonals (n >= 1, k >= 1).

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 4, 9, 8, 1, 5, 16, 27, 16, 1, 6, 25, 64, 81, 32, 1, 7, 36, 125, 256, 243, 64, 1, 8, 49, 216, 625, 1024, 729, 128, 1, 9, 64, 343, 1296, 3125, 4096, 2187, 256, 1, 10, 81, 512, 2401, 7776, 15625, 16384, 6561, 512, 1, 11, 100, 729, 4096, 16807, 46656, 78125, 65536, 19683, 1024, 1
Offset: 1

Views

Author

Keywords

Comments

Sum of antidiagonals is A003101(n) for n>0. - Alford Arnold, Jan 14 2007

Examples

			Table begins
1,    1,    1,    1,    1, ...
2,    4,    8,   16,   32, ...
3,    9,   27,   81,  243, ...
4,   16,   64,  256, 1024, ...
		

Crossrefs

Programs

Formula

a(n) = A004736(n)^A002260(n) or ((t*t+3*t+4)/2-n)^(n-(t*(t+1)/2)), where t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 14 2012

Extensions

More terms from James Sellers, Dec 11 1999

A003320 a(n) = max_{k=0..n} k^(n-k).

Original entry on oeis.org

1, 1, 1, 2, 4, 9, 27, 81, 256, 1024, 4096, 16384, 78125, 390625, 1953125, 10077696, 60466176, 362797056, 2176782336, 13841287201, 96889010407, 678223072849, 4747561509943, 35184372088832, 281474976710656, 2251799813685248
Offset: 0

Views

Author

Keywords

Comments

For n > 0, a(n+1) = largest term of row n in triangles A051129 and A247358. - Reinhard Zumkeller, Sep 14 2014

Examples

			a(5) = max(5^0, 4^1, 3^2, 2^3, 1^4, 0^5) = max(1,4,9,8,1,0) = 9.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • I. Tomescu, Introducere in Combinatorica. Editura Tehnica, Bucharest, 1972, p. 231.

Crossrefs

Programs

  • Haskell
    a003320 n = maximum $ zipWith (^) [0 .. n] [n, n-1 ..]
    -- Reinhard Zumkeller, Jun 24 2013
    
  • Mathematica
    Join[{1},Max[#]&/@Table[k^(n-k),{n,25},{k,n}]] (* Harvey P. Dale, Jun 20 2011 *)
  • PARI
    a(n) = vecmax(vector(n+1, k, (k-1)^(n-k+1))); \\ Michel Marcus, Jun 13 2017

Formula

a(n) = A056155(n-1)^(n - A056155(n-1)), for n >= 2. - Ridouane Oudra, Dec 09 2020

Extensions

Easdown reference from Michail Kats (KatsMM(AT)info.sgu.ru)
More terms from James Sellers, Aug 21 2000

A293500 Number of orientable strings of length n using a maximum of k colors, array read by descending antidiagonals, T(n,k) for n >= 1 and k >= 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 3, 2, 0, 0, 6, 9, 6, 0, 0, 10, 24, 36, 12, 0, 0, 15, 50, 120, 108, 28, 0, 0, 21, 90, 300, 480, 351, 56, 0, 0, 28, 147, 630, 1500, 2016, 1053, 120, 0, 0, 36, 224, 1176, 3780, 7750, 8064, 3240, 240, 0, 0, 45, 324, 2016, 8232, 23220, 38750, 32640, 9720, 496, 0
Offset: 1

Views

Author

Andrew Howroyd, Oct 10 2017

Keywords

Comments

Reversing the string does not leave it unchanged. Only one string from each pair is counted.
Equivalently, the number of nonequivalent strings up to reversal that are not palindromes.
Except for the first term, column k is the "BHK" (reversible, identity, unlabeled) transform of k,0,0,0,... [Corrected by Petros Hadjicostas, Jul 01 2018]
From Petros Hadjicostas, Jul 01 2018: (Start)
Consider the input sequence (c_k(n): n >= 1) with g.f. C_k(x) = Sum_{n>=1} c_k(n)*x^n. Let a_k(n) = BHK(c_k(n): n >= 1) be the output sequence under Bower's BHK transform. It can be proved that the g.f. of BHK(c_k(n): n >= 1) is A_k(x) = (C_k(x)^2 - C_k(x^2))/(2*(1-C_k(x))*(1-C_k(x^2))) + C_k(x). (See the comments for sequences A032096, A032097, and A032098.)
For column k of this two-dimensional array, the input sequence is defined by c_k(1) = k and c_k(n) = 0 for n >= 1. Thus, C_k(x) = k*x, and hence the g.f. of column k (with the term C_k(x) = k*x excluded) is (C_k(x)^2 - C_k(x^2))/(2*(1-C_k(x))*(1-C_k(x^2))) = (1/2)*(k - 1)*k*x^2/((k*x^2 - 1)*(k*x - 1)), from which we can easily prove Howroyd's formula.
(End)
Comment from Bahman Ahmadi, Aug 05 2019: (Start)
We give an alternative definition for the square array A(n,k) = T(n,k) with n >= 2 and k >= 0. A(n,k) is the number of inequivalent "distinguishing colorings" of the path on n vertices using at most k colors. The rows are indexed by n, the number of vertices of the path, and the columns are indexed by k, the number of permissible colors.
A vertex-coloring of a graph G is called "distinguishing" if it is only preserved by the identity automorphism of G. This notion is considered in the context of "symmetry breaking" of simple (finite or infinite) graphs. Two vertex-colorings of a graph are called "equivalent" if there is an automorphism of the graph which preserves the colors of the vertices. Given a graph G, we use the notation Phi_k(G) to denote the number of inequivalent distinguishing colorings of G with at most k colors. This sequence gives A(n,k) = Phi_k(P_n), i.e., the number of inequivalent distinguishing colorings of the path P_n on n vertices with at most k colors.
For n=3, we can color the vertices of P_3 with at most 2 colors in 3 ways such that all the colorings distinguish the graph (i.e., no non-identity automorphism of the path P_3 preserves the coloring) and that all the three colorings are inequivalent.
We have Phi_k(P_n) = binomial(k,2)*k^(n-2) + k*Phi_k(P_(n-2)) for n >= 4; Phi_k(P_2) = binomial(k,2); Phi_k(P_3) = k*binomial(k,2).
(End)

Examples

			Array begins:
======================================================
n\k| 1   2    3     4      5      6       7       8
---|--------------------------------------------------
1  | 0   0    0     0      0      0       0       0...
2  | 0   1    3     6     10     15      21      28...
3  | 0   2    9    24     50     90     147     224...
4  | 0   6   36   120    300    630    1176    2016...
5  | 0  12  108   480   1500   3780    8232   16128...
6  | 0  28  351  2016   7750  23220   58653  130816...
7  | 0  56 1053  8064  38750 139320  410571 1046528...
8  | 0 120 3240 32640 195000 839160 2881200 8386560...
...
For T(4,2)=6, the chiral pairs are AAAB-BAAA, AABA-ABAA, AABB-BBAA, ABAB-BABA, ABBB-BBBA, and BABB-BBAB.
		

Crossrefs

Columns 2-5 for n > 1 are A032085, A032086, A032087, A032088.
Column 6 is A320524.
Rows 2-6 are A161680, A006002(n-1), A083374, A321672, A085744.
Cf. A003992 (oriented), A277504 (unoriented), A321391 (achiral).

Programs

  • Mathematica
    Table[Function[n, (k^n - k^(Ceiling[n/2]))/2][m - k + 1], {m, 11}, {k, m, 1, -1}] // Flatten (* Michael De Vlieger, Oct 11 2017 *)
  • PARI
    T(n,k) = (k^n - k^(ceil(n/2)))/2;

Formula

T(n,k) = (k^n - k^(ceiling(n/2)))/2.
G.f. for column k: (1/2)*(k - 1)*k*x^2/((k*x^2 - 1)*(k*x - 1)). - Petros Hadjicostas, Jul 07 2018
From Robert A. Russell, Nov 16 2018: (Start)
T(n,k) = (A003992(k,n) - A321391(n,k)) / 2.
T(n,k) = = A003992(k,n) - A277504(n,k) = A277504(n,k) - A321391(n,k).
G.f. for row n: (Sum_{j=0..n} S2(n,j)*j!*x^j/(1-x)^(j+1) - Sum_{j=0..ceiling(n/2)} S2(ceiling(n/2),j)*j!*x^j/(1-x)^(j+1)) / 2, where S2 is the Stirling subset number A008277.
G.f. for row n>1: x * Sum_{k=1..n-1} A145883(n,k) * x^k / (1-x)^(n+1).
E.g.f. for row n: (Sum_{k=0..n} S2(n,k)*x^k - Sum_{k=0..ceiling(n/2)} S2(ceiling(n/2),k)*x^k) * exp(x) / 2, where S2 is the Stirling subset number A008277.
T(0,k) = T(1,k) = 0; T(2,k) = binomial(k,2); for n>2, T(n,k) = k*(T(n-3,k)+T(n-2,k)-k*T(n-1,k)).
For k>n, T(n,k) = Sum_{j=1..n+1} -binomial(j-n-2,j) * T(n,k-j). (End)

A265583 Array T(n,k) = k*(k-1)^(n-1) read by ascending antidiagonals; k,n >= 1.

Original entry on oeis.org

1, 0, 2, 0, 2, 3, 0, 2, 6, 4, 0, 2, 12, 12, 5, 0, 2, 24, 36, 20, 6, 0, 2, 48, 108, 80, 30, 7, 0, 2, 96, 324, 320, 150, 42, 8, 0, 2, 192, 972, 1280, 750, 252, 56, 9, 0, 2, 384, 2916, 5120, 3750, 1512, 392, 72, 10, 0, 2, 768, 8748, 20480, 18750, 9072, 2744, 576, 90, 11
Offset: 1

Views

Author

R. J. Mathar, Dec 10 2015

Keywords

Comments

T(n,k) is the number of n-letter words in a k-letter alphabet with no adjacent letters the same. The factor k represents the number of choices of the first letter, and the n-1 times repeated factor k-1 represents the choices of the next n-1 letters avoiding their predecessor.
The antidiagonal sums are s(d) = 1, 2, 5, 12, 31, 88, 275, 942, 3513, 14158, 61241, 282632, .. for d = n+k >= 2.

Examples

			      1       2       3       4       5       6       7
      0       2       6      12      20      30      42
      0       2      12      36      80     150     252
      0       2      24     108     320     750    1512
      0       2      48     324    1280    3750    9072
      0       2      96     972    5120   18750   54432
      0       2     192    2916   20480   93750  326592
T(3,3)=12 counts aba, abc, aca, acb, bab, bac, bca, bcb, cab, cac, cba, cbc. Words like aab or cbb are not counted.
		

Crossrefs

Cf. A007283 (column 3), A003946 (column 4), A003947 (column 5), A002378 (row 2), A011379 (row 3), A179824 (row 4), A055897 (diagonal), A265584.

Programs

  • GAP
    T:= function(n,k)
        if (n=1 and k=1) then return 1;
        else return k*(k-1)^(n-k-1);
        fi;
      end;
    Flat(List([2..15], n-> List([1..n-1], k-> T(n,k) ))); # G. C. Greubel, Aug 10 2019
  • Magma
    T:= func< n,k | (n eq 1 and k eq 1) select 1 else k*(k-1)^(n-k-1) >;
    [T(n,k): k in [1..n-1], n in [2..15]]; // G. C. Greubel, Aug 10 2019
    
  • Maple
    A265583 := proc(n,k)
        k*(k-1)^(n-1) ;
    end proc:
    seq(seq( A265583(d-k,k),k=1..d-1),d=2..13) ;
  • Mathematica
    T[1,1] = 1; T[n_, k_] := If[k==1, 0, k*(k-1)^(n-1)]; Table[T[n-k,k], {n,2,12}, {k,1,n-1}] // Flatten (* Amiram Eldar, Dec 13 2018 *)
  • PARI
    T(n,k) = if(n==k==1, 1, k*(k-1)^(n-k-1) );
    for(n=2,15, for(k=1,n-1, print1(T(n,k), ", "))) \\ G. C. Greubel, Aug 10 2019
    
  • Sage
    def T(n, k):
        if (n==k==1): return 1
        else: return k*(k-1)^(n-k-1)
    [[T(n, k) for k in (1..n-1)] for n in (2..15)] # G. C. Greubel, Aug 10 2019
    

Formula

T(n,k) = k*A051129(n-1,k-1) = k*A003992(k-1,n-1).
G.f. for column k: k*x/(1-(k-1)*x). - R. J. Mathar, Dec 12 2015
G.f. for array: y/(y-1) - (1+1/x)*y*LerchPhi(y,1,-1/x). - Robert Israel, Dec 13 2018

A287698 Square array A(n,k) = (n!)^3 [x^n] hypergeom([], [1, 1], z)^k read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 10, 1, 0, 1, 4, 27, 56, 1, 0, 1, 5, 52, 381, 346, 1, 0, 1, 6, 85, 1192, 6219, 2252, 1, 0, 1, 7, 126, 2705, 36628, 111753, 15184, 1, 0, 1, 8, 175, 5136, 124405, 1297504, 2151549, 104960, 1, 0
Offset: 0

Views

Author

Peter Luschny, May 30 2017

Keywords

Comments

Let A_m(n,k) = (n!)^m [x^n] hypergeom([], [1,…,1], z)^k where [1,…,1] lists (m-1) times 1. These arrays can be seen as generalizations of the power functions n^k. For m = 1 -> A003992, m = 2 -> A287316, m = 3 -> A287698.
A_m(n,n) is the sum of m-th powers of coefficients in the full expansion of (z_1+z_2+...+z_n)^n (compare A245397).
A287696 provide polynomials and A287697 rational functions generating the columns of the array.

Examples

			Array starts:
k\n| 0  1    2       3       4         5           6             7
---|-------------------------------------------------------------------
k=0| 1, 0,   0,      0,      0,        0,          0,            0, ... A000007
k=1| 1, 1,   1,      1,      1,        1,          1,            1, ... A000012
k=2| 1, 2,  10,     56,    346,     2252,      15184,       104960, ... A000172
k=3| 1, 3,  27,    381,   6219,   111753,    2151549,     43497891, ... A141057
k=4| 1, 4,  52,   1192,  36628,  1297504,   50419096,   2099649808, ... A287699
k=5| 1, 5,  85,   2705, 124405,  7120505,  464011825,  33031599725, ...
k=6| 1, 6, 126,   5136, 316206, 25461756, 2443835736, 263581282656, ...
       A001107,A287702,A287700,  A287701,                               A055733
		

Crossrefs

Rows: A000007 (k=0), A000012 (k=1), A000172 (k=2), A141057 (k=3), A287699 (k=4).
Columns: A000172 (n=1), A001477(n=1), A001107 (n=2), A287702 (n=3), A287700 (n=4), A287701 (n=5).

Programs

  • Maple
    A287698_row := (k, len) -> seq(A287696_poly(j)(k), j=0..len):
    A287698_row := proc(k, len) hypergeom([], [1, 1], x):
    series(%^k, x, len); seq((i!)^3*coeff(%, x, i), i=0..len-1) end:
    for k from 0 to 6 do A287698_row(k, 9) od;
    A287698_col := proc(n, len) local k, x; hypergeom([], [1, 1], z);
    series(%^x, z=0, n+1): unapply(n!^3*coeff(%, z, n), x); seq(%(j), j=0..len) end:
    for n from 0 to 7 do A287698_col(n, 9) od;
  • Mathematica
    Table[Table[SeriesCoefficient[HypergeometricPFQ[{},{1,1},x]^k, {x, 0, n}] (n!)^3, {n, 0, 6}], {k, 0, 9}] (* as a table of rows *)
Showing 1-10 of 23 results. Next