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 16 results. Next

A066274 Number of endofunctions of [n] such that 1 is not a fixed point.

Original entry on oeis.org

0, 2, 18, 192, 2500, 38880, 705894, 14680064, 344373768, 9000000000, 259374246010, 8173092077568, 279577021469772, 10318292052303872, 408700964355468750, 17293822569102704640, 778579070010669895696, 37160496515557841043456, 1874292305362402347591138
Offset: 1

Views

Author

Len Smiley, Dec 09 2001

Keywords

Comments

a(n) is the number of functional digraphs that are not a solitary rooted tree. - Geoffrey Critzer, Aug 31 2013
For n > 1 a(n) is the number of numbers with n digits in base n. - Gionata Neri, Feb 18 2016
a(n) is the number of pairs of adjacent equal letters in all n-ary words of length n. - John Tyler Rascoe, Nov 19 2024

Examples

			a(2)=2: [1->2,2->1], [1->2,2->2].
		

Crossrefs

Programs

Formula

a(n) = n^n - n^(n-1).
E.g.f.: T^2/(1-T), where T=T(x) is Euler's tree function (see A000169).
For n > 1 a(n)=1/(Integral_{x=n..infinity} 1/x^n dx). - Francesco Daddi, Aug 01 2011
a(n) = sum(i=1..n-1, C(n,i)*(i^i*(n-i)^(n-i-1))). - Vladimir Kruchinin May 15 2013
E.g.f.: x^2*A''(x) where A(x) is the e.g.f. for A000272. - Geoffrey Critzer, Aug 31 2013
a(n) = 2*A081131(n) = 2*|A070896(n)|. - Geoffrey Critzer, Aug 31 2013

A081132 a(n) = (n+1)^n*binomial(n+2,2).

Original entry on oeis.org

1, 6, 54, 640, 9375, 163296, 3294172, 75497472, 1937102445, 55000000000, 1711870023666, 57954652913664, 2120125746145771, 83340051191685120, 3503151123046875000, 156797324626531188736, 7445162356977030877593
Offset: 0

Views

Author

Paul Barry, Mar 08 2003

Keywords

Comments

A diagonal of A081130.
a(n) is the sum of all the fixed points in the set of endofunctions on {1,2,...,n+1}, i.e., the functions f:{1,2,...,n+1} -> {1,2,...,n+1}. - Geoffrey Critzer, Sep 17 2011

Examples

			a(1) = 6 because there are four functions from {1,2} into {1,2}: (1*,1) (1*,2*) (2,1) (2,2*) and the fixed points (marked *) sum to 6.
		

Crossrefs

Sequences of the form (n+m)^n*binomial(n+2,2): A081133 (m=0), this sequence (m=1), A081131 (m=2), A053507 (m=3), A081196 (m=4).

Programs

  • Magma
    [((n+1)^n*Binomial(n+2,2)): n in [0..20]]; // Vincenzo Librandi, Sep 21 2011
    
  • Maple
    seq((n+1)^n*binomial(n+2,2), n=0..20); # G. C. Greubel, May 18 2021
  • Mathematica
    Table[n^n*(n+1)/2,{n,20}]
  • Sage
    [(n+1)^n*binomial(n+2,2) for n in (0..20)] # G. C. Greubel, May 18 2021

Formula

a(n) = (n+1)^n*binomial(n+2,2).

A081130 Square array of binomial transforms of (0,0,1,0,0,0,...), read by antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, 0, 0, 1, 6, 6, 0, 0, 0, 1, 9, 24, 10, 0, 0, 0, 1, 12, 54, 80, 15, 0, 0, 0, 1, 15, 96, 270, 240, 21, 0, 0, 0, 1, 18, 150, 640, 1215, 672, 28, 0, 0, 0, 1, 21, 216, 1250, 3840, 5103, 1792, 36, 0, 0, 0, 1, 24, 294, 2160, 9375, 21504, 20412, 4608, 45, 0
Offset: 0

Views

Author

Paul Barry, Mar 08 2003

Keywords

Comments

Rows, of the square array, are three-fold convolutions of sequences of powers.

Examples

			The array begins as:
  0,  0,  0,   0,   0,    0, ...
  0,  0,  0,   0,   0,    0, ...
  0,  1,  1,   1,   1,    1, ... A000012
  0,  3,  6,   9,  12,   15, ... A008585
  0,  6, 24,  54,  96,  150, ... A033581
  0, 10, 80, 270, 640, 1250, ... A244729
The antidiagonal triangle begins as:
  0;
  0, 0;
  0, 0, 0;
  0, 0, 1, 0;
  0, 0, 1, 3,  0;
  0, 0, 1, 6,  6,  0;
  0, 0, 1, 9, 24, 10, 0;
		

Crossrefs

Main diagonal: A081131.
Rows: A000012 (n=2), A008585 (n=3), A033581 (n=4), A244729 (n=5).
Columns: A000217 (k=1), A001788 (k=2), A027472 (k=3), A038845 (k=4), A081135 (k=5), A081136 (k=6), A027474 (k=7), A081138 (k=8), A081139 (k=9), A081140 (k=10), A081141 (k=11), A081142 (k=12), A027476 (k=15).

Programs

  • Magma
    [k eq n select 0 else (n-k)^(k-2)*Binomial(k,2): k in [0..n], n in [0..12]]; // G. C. Greubel, May 14 2021
    
  • Mathematica
    Table[If[k==n, 0, (n-k)^(k-2)*Binomial[k, 2]], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 14 2021 *)
  • PARI
    T(n, k)=if (k==0, 0, k^(n-2)*binomial(n, 2));
    seq(nn) = for (n=0, nn, for (k=0, n, print1(T(k, n-k), ", ")); );
    seq(12) \\ Michel Marcus, May 14 2021
  • Sage
    flatten([[0 if (k==n) else (n-k)^(k-2)*binomial(k,2) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 14 2021
    

Formula

T(n, k) = k^(n-2)*binomial(n, 2), with T(n, 0) = 0 (square array).
T(n, n) = A081131(n).
Rows have g.f. x^3/(1-k*x)^n.
From G. C. Greubel, May 14 2021: (Start)
T(k, n-k) = (n-k)^(k-2)*binomial(k,2) with T(n, n) = 0 (antidiagonal triangle).
Sum_{k=0..n} T(n, n-k) = A081197(n). (End)

Extensions

Term a(5) corrected by G. C. Greubel, May 14 2021

A081133 a(n) = n^n*binomial(n+2, 2).

Original entry on oeis.org

1, 3, 24, 270, 3840, 65625, 1306368, 29647548, 754974720, 21308126895, 660000000000, 22254310307658, 811365140791296, 31801886192186565, 1333440819066961920, 59553569091796875000, 2822351843277561397248
Offset: 0

Views

Author

Paul Barry, Mar 08 2003

Keywords

Comments

A diagonal of A081130.

Crossrefs

Sequences of the form (n+m)^n*binomial(n+2,2): this sequence (m=0), A081132 (m=1), A081131 (m=2), A053507 (m=3), A081196 (m=4).

Programs

  • Magma
    [(n^n*Binomial(n+2,2)): n in [0..20]]; // Vincenzo Librandi, Sep 22 2011
    
  • Maple
    seq(n^n*binomial(n+2,2), n=0..20); # G. C. Greubel, May 18 2021
  • Mathematica
    Join[{1},Table[n^n Binomial[n+2,2],{n,20}]] (* Harvey P. Dale, Dec 27 2011 *)
  • Sage
    [n^n*binomial(n+2,2) for n in (0..20)] # G. C. Greubel, May 18 2021

Formula

a(n) = n^n*(n+1)*(n+2)/2.

A123744 Circulants of Fibonacci numbers (including F_0 = 0).

Original entry on oeis.org

1, 0, 1, 2, 16, 287, 16128, 2192140, 830952837, 805644641664, 2080690769701456, 14002804169885909807, 247753675148653634781184, 11469641168045182197979378136, 1391545878431673359565624090480585, 442017027765434652128920030338417270784, 367683484076057642925500106042968712221296320
Offset: 0

Views

Author

Wolfdieter Lang, Nov 10 2006, Jan 27 2009

Keywords

Comments

A circulant C_n is the determinant of a circulant n X n matrix M, i.e. one with entries M_{i,j}=a_{i-j} where the indices are taken mod n. Hence C_n=C_n([a_n,a_{n-1},...,a_1]), with the first row of M given.
The eigenvalues of a circulant n X n matrix M(n) are lambda^{(n)}_k=sum(a_j*(rho_n)^(j*k),j=1..n), with the n-th roots of unity (rho_n)^k, k=1..n, where rho_n:=exp(2*Pi/n). See the P. J. Davis reference which uses a different convention.

Examples

			n=4: the circular 4 X 4 matrix is M(4) = matrix([[2,1,1,0],[0,2,1,1],[1,0,2,1],[1,1,0,2]]).
n=4: 4th roots of unity: rho_4 = I, (rho_4)^2 = -1, (rho_4)^3 = -I, (rho_4)^4 =1, with I^2=-1. A123744 n=4: the eigenvalues of M(4) are therefore: 0*I^k + 1*(-1)^k + 1*(-I)^k + 2*1^k, k=1,...,4, namely 1-I, 2, 1+I, 4.
n=4: a(4)= Det(M(4)) = 16 = (1-I)*2*(1+I)*4.
		

References

  • P. J. Davis, Circulant Matrices, J. Wiley, New York, 1979.

Crossrefs

Cf. A123745 (other Fibonacci circulants without F_0 = 0).
Cf. A081131 (with n instead of Fibonacci(n)).
Cf. A000045.

Programs

  • PARI
    mm(n) = matdet(matrix(n, n, i, j, fibonacci(n-1-lift(Mod(j-i, n))))); \\ Michel Marcus, Aug 11 2019

Formula

a(n) = product(lambda^{(n)}k,k=1..n), with lambda^{(n)}_k=sum(F{j-1}*(rho_n)^(j*k),j=1..n).
a(n) = C_n([F_{n-1},F_{n-2},...,F_0]) with the Fibonacci numbers F_n:=A000045(n) and the circulant C_n (see comment above).

Extensions

More terms from Michel Marcus, Aug 11 2019
a(0)=1 prepended by Alois P. Heinz, Jun 27 2025

A228273 T(n,k) is the number of s in {1,...,n}^n having longest ending contiguous subsequence with the same value of length k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 18, 6, 3, 0, 192, 48, 12, 4, 0, 2500, 500, 100, 20, 5, 0, 38880, 6480, 1080, 180, 30, 6, 0, 705894, 100842, 14406, 2058, 294, 42, 7, 0, 14680064, 1835008, 229376, 28672, 3584, 448, 56, 8, 0, 344373768, 38263752, 4251528, 472392, 52488, 5832, 648, 72, 9
Offset: 0

Views

Author

Alois P. Heinz, Aug 19 2013

Keywords

Examples

			T(0,0) = 1: [].
T(1,1) = 1: [1].
T(2,1) = 2: [1,2], [2,1].
T(2,2) = 2: [1,1], [2,2].
T(3,1) = 18: [1,1,2], [1,1,3], [1,2,1], [1,2,3], [1,3,1], [1,3,2], [2,1,2], [2,1,3], [2,2,1], [2,2,3], [2,3,1], [2,3,2], [3,1,2], [3,1,3], [3,2,1], [3,2,3], [3,3,1], [3,3,2].
T(3,2) = 6: [1,2,2], [1,3,3], [2,1,1], [2,3,3], [3,1,1], [3,2,2].
T(3,3) = 3: [1,1,1], [2,2,2], [3,3,3].
Triangle T(n,k) begins:
  1;
  0,        1;
  0,        2,       2;
  0,       18,       6,      3;
  0,      192,      48,     12,     4;
  0,     2500,     500,    100,    20,    5;
  0,    38880,    6480,   1080,   180,   30,   6;
  0,   705894,  100842,  14406,  2058,  294,  42,  7;
  0, 14680064, 1835008, 229376, 28672, 3584, 448, 56,  8;
		

Crossrefs

Row sums give: A000312.
Columns k=0-4 give: A000007, A066274(n) = 2*A081131(n) for n>1, A053506(n) for n>2, A055865(n-1) = A085389(n-1) for n>3, A085390(n-1) for n>4.
Main diagonal gives: A028310.
Lower diagonals include (offsets may differ): A002378, A045991, A085537, A085538, A085539.

Programs

  • Maple
    T:= (n, k)-> `if`(n=0 and k=0, 1, `if`(k<1 or k>n, 0,
                 `if`(k=n, n, (n-1)*n^(n-k)))):
    seq(seq(T(n,k), k=0..n), n=0..12);
  • Mathematica
    f[0,0]=1;
    f[n_,k_]:=Which[1<=k<=n-1,n^(n-k)*(n-1),k<1,0,k==n,n,k>n,0];
    Table[Table[f[n,k],{k,0,n}],{n,0,10}]//Grid (* Geoffrey Critzer, May 19 2014 *)

Formula

T(0,0) = 1, else T(n,k) = 0 for k<1 or k>n, else T(n,n) = n, else T(n,k) = (n-1)*n^(n-k).
Sum_{k=0..n} T(n,k) = A000312(n).
Sum_{k=0..n} k*T(n,k) = A031972(n).

A303260 Determinant of n X n matrix A[i,j] = (j - i - 1 mod n) + [i=j], i.e., the circulant having (n, 0, 1, ..., n-2) as first row.

Original entry on oeis.org

1, 1, 4, 28, 273, 3421, 52288, 941578, 19505545, 456790123, 11931215316, 343871642632, 10840081272265, 371026432467913, 13702802011918048, 543154131059225686, 23000016472483168305, 1036227971225610466711, 49492629462587441963140, 2497992686980609418282548, 132849300060919364474261281
Offset: 0

Views

Author

M. F. Hasler, Apr 23 2018

Keywords

Comments

It is remarkable that for odd n, this determinant has its base n+1 digits equal to the middle row: e.g., a(9) = 456790123 is the determinant of the circulant matrix having [4,5,6,7,9,0,1,2,3] as middle row.
a(0) = 1 is (by convention) the determinant of a 0 X 0 matrix.

Examples

			a(5) = 3421 is the determinant of the matrix
   ( 5 0 1 2 3 )
   ( 3 5 0 1 2 )
   ( 2 3 5 0 1 )  and 3421 = 23501[6], i.e., written in base 6.
   ( 1 2 3 5 0 )
   ( 0 1 2 3 5 ).
		

Crossrefs

Cf. A081131(n+1) = determinant of the circulant matrix C(n) defined in formula, A070896 (signed variant).
See also A219324.

Programs

  • PARI
    a(n)=matdet(matrix(n,n,i,j,(j-i-1)%n+(i==j)))
    
  • Python
    from sympy import Matrix
    def A303260(n): return Matrix(n,n, lambda i,j:(j-i-1) % n + (i==j)).det() # Chai Wah Wu, Oct 18 2021

Formula

a(n) = det(I(n) + C(n)), where I(n) is the n X n identity matrix and C(n) is the circulant having (n-1, ..., 0) as first column.

A081196 a(n) = (n+4)^n*binomial(n+2,2).

Original entry on oeis.org

1, 15, 216, 3430, 61440, 1240029, 28000000, 701538156, 19349176320, 583247465515, 19090807228416, 674680957031250, 25614222880669696, 1039980693455123385, 44977604109849722880, 2064633276062972568664
Offset: 0

Views

Author

Paul Barry, Mar 11 2003

Keywords

Comments

Diagonal of A081130.

Crossrefs

Sequences of the form (n+m)^n*binomial(n+2,2): A081133 (m=0), A081132 (m=1), A081131 (m=2), A053507 (m=3), this sequence (m=4).

Programs

  • Magma
    [(n+4)^n*Binomial(n+2,2): n in [0..20]]; // Vincenzo Librandi, Aug 07 2013
    
  • Maple
    seq((n+4)^n*binomial(n+2,2), n=0..20); # G. C. Greubel, May 18 2021
  • Mathematica
    Table[(n+4)^n Binomial[n+2, 2], {n, 0, 30}] (* Vincenzo Librandi, Aug 07 2013 *)
  • Sage
    [(n+4)^n*binomial(n+2,2) for n in (0..20)] # G. C. Greubel, May 18 2021

Formula

a(n) = (n+4)^n*binomial(n+2,2).

A364709 Triangle read by rows: T(n,k) is the number of forests of labeled rooted hypertrees with n vertices and weight k, 0 <= k < n.

Original entry on oeis.org

1, 2, 1, 9, 9, 1, 64, 96, 28, 1, 625, 1250, 625, 75, 1, 7776, 19440, 14040, 3240, 186, 1, 117649, 352947, 336140, 120050, 14749, 441, 1, 2097152, 7340032, 8716288, 4300800, 870912, 61824, 1016, 1, 43046721, 172186884, 245525742, 156243654, 45605511, 5664330, 245025, 2295, 1
Offset: 1

Views

Author

Paul Laubie, Oct 20 2023

Keywords

Comments

The weight is the number of hypertrees minus 1 plus the weight of each hyperedge which is the number of vertices it connects minus 2.
T(n,k) is also the dimension of the operad ComPreLie in arity n with k commutative products.

Examples

			Triangle T(n,k) begins:
n\k   0     1    2    3    4 ...
1     1;
2     2,    1;
3     9,    9,   1;
4    64,   96,  28,   1;
5   625, 1250, 625,  75,   1;
...
		

Crossrefs

Cf. A000169 (k=0), A081131 (k=1).
Row sums are A052888.
Series reversion as e.g.f of A111492 with an offset of 1.

Programs

  • PARI
    T(n) = my(x='x+O('x^(n+1))); [Vecrev(p) | p<-Vec(serlaplace( serreverse(log(1+x*y)*exp(-x)/y )))]
    {my(A=T(10)); for(n=1, #A, print(A[n]))} \\ Andrew Howroyd, Oct 20 2023

Formula

E.g.f: series reversion in t of (log(1+x*t)/x)*exp(-t).
T(n,0) = n^(n-1).
T(n,n-1) = 1.

Extensions

a(23) corrected by Andrew Howroyd, Jan 01 2024

A368982 Triangle read by rows: T(n, k) = binomial(n, k - 1) * (k - 1)^(k - 1) * (n - k) * (n - k + 1)^(n - k) / 2.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 9, 3, 0, 0, 96, 36, 24, 0, 0, 1250, 480, 360, 270, 0, 0, 19440, 7500, 5760, 4860, 3840, 0, 0, 352947, 136080, 105000, 90720, 80640, 65625, 0, 0, 7340032, 2823576, 2177280, 1890000, 1720320, 1575000, 1306368, 0
Offset: 0

Views

Author

Peter Luschny, Jan 11 2024

Keywords

Examples

			Triangle starts:
  [0] [0]
  [1] [0,       0]
  [2] [0,       1,       0]
  [3] [0,       9,       3,       0]
  [4] [0,      96,      36,      24,       0]
  [5] [0,    1250,     480,     360,     270,       0]
  [6] [0,   19440,    7500,    5760,    4860,    3840,       0]
  [7] [0,  352947,  136080,  105000,   90720,   80640,   65625,       0]
  [8] [0, 7340032, 2823576, 2177280, 1890000, 1720320, 1575000, 1306368, 0]
		

Crossrefs

A368849, A369016 and this sequence are alternative sum representation for A001864 with different normalizations.
T(n, k) = A368849(n, k) / 2.
T(n, 1) = A081131(n) for n >= 1.
T(n, n - 1) = A081133(n - 2) for n >= 2.
Sum_{k=0..n} T(n, k) = A036276(n - 1) for n >= 1.
Sum_{k=0..n} (-1)^(k+1)*T(n, k) = A368981(n) / 2 for n >= 0.

Programs

  • Maple
    T := (n, k) -> binomial(n, k-1)*(k-1)^(k-1)*(n-k)*(n-k+1)^(n-k)/2:
    seq(seq(T(n, k), k = 0..n), n=0..9);
  • Mathematica
    A368982[n_, k_] := Binomial[n, k-1] If[k == 1, 1, (k-1)^(k-1)] (n-k) (n-k+1)^(n-k)/2; Table[A368982[n, k], {n, 0, 10}, {k, 0, n}] (* Paolo Xausa, Jan 28 2024 *)
  • SageMath
    def T(n, k): return binomial(n, k-1)*(k-1)^(k-1)*(n-k)*(n-k+1)^(n-k)//2
    for n in range(0, 9): print([T(n, k) for k in range(n + 1)])

Formula

Showing 1-10 of 16 results. Next