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.

Previous Showing 41-50 of 605 results. Next

A052182 Determinant of n X n matrix whose rows are cyclic permutations of 1..n.

Original entry on oeis.org

1, -3, 18, -160, 1875, -27216, 470596, -9437184, 215233605, -5500000000, 155624547606, -4829554409472, 163086595857367, -5952860799406080, 233543408203125000, -9799832789158199296, 437950726881001816329, -20766159817517617053696, 1041273502979112415328410
Offset: 1

Views

Author

Henry M. Gunn High School Mathematical Circle (Joshua Zucker), Jan 26 2000

Keywords

Comments

Each row is a cyclic shift to the right by one place of the previous row. See the example below. - N. J. A. Sloane, Jan 07 2019
|a(n)| = number of labeled mappings from n points to themselves (endofunctions) with an odd number of cycles. - Vladeta Jovovic, Mar 30 2006
|a(n)| = number of functions from {1,2,...,n}->{1,2,...,n} such that of all recurrent elements the least is always mapped to the greatest. - Geoffrey Critzer, Aug 29 2013

Examples

			a(3) = 18 because this is the determinant of [(1,2,3), (3,1,2), (2,3,1) ].
		

Crossrefs

Programs

  • Maple
    1,seq(LinearAlgebra:-Determinant(Matrix(n,shape=Circulant[$1..n])),n=2..30); # Robert Israel, Aug 31 2014
  • Mathematica
    f[n_] := Det[ Table[ RotateLeft[ Range@ n, -j], {j, 0, n - 1}]]; Array[f, 19] (* or *)
    f[n_] := (-1)^(n - 1)*n^(n - 2)*(n^2 + n)/2; Array[f, 19]
    (* Robert G. Wilson v, Aug 31 2014 *)
    Table[Det[Table[RotateRight[Range[k],n],{n,0,k-1}]],{k,30}] (* Harvey P. Dale, Jun 20 2024 *)
  • MuPAD
    (1+n)^(n-1)*binomial(n+2,n)*(-1)^(n) $ n=0..16 // Zerinvary Lajos, Apr 01 2007
    
  • PARI
    a(n) = (n+1)*(-n)^(n-1)/2; \\ Altug Alkan, Dec 17 2017

Formula

a(n) = (-1)^(n-1) * n^(n-2) * (n^2 + n)/2.
E.g.f.[A052182] = E.g.f.[A000312] * E.g.f.[A000272], so A052182(unsigned) is "tree-like". E.g.f.: (T-T^2/2)/(1-T), where T=T(x) is Euler's tree function (see A000169). E.g.f. for signed sequence: (W+W^2/2)/(1+W), where W=W(x)=-T(-x) is the Lambert W function. - Len Smiley, Dec 13 2001
Conjecture: a(n) = -Res( f(n), x^n - 1), where Res is the resultant and f(n) = Sum_{k=1..n} k*x^k. - Benedict W. J. Irwin, Dec 07 2016

Extensions

More terms from James Sellers, Jan 31 2000

A167010 a(n) = Sum_{k=0..n} C(n,k)^n.

Original entry on oeis.org

1, 2, 6, 56, 1810, 206252, 86874564, 132282417920, 770670360699138, 16425660314368351892, 1367610300690018553312276, 419460465362069257397304825200, 509571049488109525160616367158261124, 2290638298071684282149128235413262383804352
Offset: 0

Views

Author

Paul D. Hanna, Nov 17 2009

Keywords

Comments

The number of n*n 0-1 matrices with equal numbers of nonzeros in every row. - David Eppstein, Jan 19 2012

Examples

			The triangle A209427 of coefficients C(n,k)^n, n>=k>=0, begins:
  1;
  1,     1;
  1,     4,        1;
  1,    27,       27,        1;
  1,   256,     1296,      256,        1;
  1,  3125,   100000,   100000,     3125,     1;
  1, 46656, 11390625, 64000000, 11390625, 46656,    1; ...
in which the row sums form this sequence.
		

Crossrefs

Programs

  • Magma
    [(&+[Binomial(n,j)^n: j in [0..n]]): n in [0..20]]; // G. C. Greubel, Aug 26 2022
    
  • Mathematica
    Table[Sum[Binomial[n, k]^n, {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Nov 05 2012 *)
  • PARI
    a(n)=sum(k=0,n,binomial(n,k)^n)
    
  • SageMath
    [sum(binomial(n,j)^n for j in (0..n)) for n in (0..20)] # G. C. Greubel, Aug 26 2022

Formula

Ignoring initial term, equals the logarithmic derivative of A167007. [Paul D. Hanna, Nov 18 2009]
If n is even then a(n) ~ c * exp(-1/4) * 2^(n^2 + n/2)/((Pi*n)^(n/2)), where c = Sum_{k = -oo..oo} exp(-2*k^2) = 1.271341522189... (see A218792). - Vaclav Kotesovec, Nov 05 2012
If n is odd then c = Sum_{k = -infinity..infinity} exp(-2*(k+1/2)^2) = 1.23528676585389... - Vaclav Kotesovec, Nov 06 2012
a(n) = (n!)^n * [x^n] (Sum_{k>=0} x^k / (k!)^n)^2. - Ilya Gutkovskiy, Jul 15 2020

A177885 a(n) = (1-n)^(n-1).

Original entry on oeis.org

1, 1, -1, 4, -27, 256, -3125, 46656, -823543, 16777216, -387420489, 10000000000, -285311670611, 8916100448256, -302875106592253, 11112006825558016, -437893890380859375, 18446744073709551616, -827240261886336764177
Offset: 0

Views

Author

Vladimir Kruchinin, Dec 28 2010

Keywords

Comments

A signed version of A000312.
LeClair gives an approximation z(n) for the location of the n-th nontrivial zero of the Riemann zeta function on the critical line, which can be expressed in terms of the exponential generating function of this sequence A(x) = x/LambertW(x) as follows: z(n) = 1/2 + 2*Pi*exp(1)*A((n - 11/8)/exp(1))*i. For example, working to 1 decimal place, z(1) = 1/2 + 14.5*i (the first nontrivial zero is at 1/2 + 14.1*i), z(10) = 1/2 + 50.2*i (the tenth nontrivial zero is at 1/2 + 49.8*i) and z(100) = 1/2 + 236*i (the hundredth nontrivial zero is at 1/2 + 236.5*i). [Peter Bala, Jun 12 2013]

Examples

			From _Paul D. Hanna_, Aug 24 2016: (Start)
E.g.f.: A(x) = 1 + x - x^2/2! + 4*x^3/3! - 27*x^4/4! + 256*x^5/5! - 3125*x^6/6! + 46656*x^7/7! - 823543*x^8/8! +...+ (1-n)^(n-1)*x^n/n! +...
Related series.
Series_Reversion(A(x) - 1) = x + x^2/2 - x^3/6 + x^4/12 - x^5/20 + x^6/30 - x^7/42 + x^8/56 - x^9/72 + x^10/90 +...+ (-x)^n/(n*(n-1)) +... (End)
		

Crossrefs

Cf. A000312, A137452 (row sums).

Programs

  • Magma
    [(1-n)^(n-1): n in [0..30]]; // Vincenzo Librandi, May 15 2011
    
  • Mathematica
    Join[{1,1}, Table[(1-n)^(n-1), {n, 2, 20}]] (* Harvey P. Dale, Aug 10 2012 *)
    nn = 18; Range[0, nn]! CoefficientList[ Series[ Exp[ ProductLog[ x]], {x, 0, nn}], x] (* Robert G. Wilson v, Aug 23 2012 *)
  • PARI
    a(n)=(1-n)^(n-1) \\ Charles R Greathouse IV, May 15 2013
    
  • PARI
    {a(n) = my(A = 1 + serreverse( x + sum(m=2,n+2, (-x)^m/(m*(m-1)) +x^2*O(x^n)))); n!*polcoeff(A,n)}
    for(n=0,30,print1(a(n),", ")) \\ Paul D. Hanna, Aug 24 2016

Formula

E.g.f. satisfies A(x) = exp(x/A(x)).
E.g.f. A(x) = x/LambertW(x) = exp(LambertW(x)) = 1 + x - x^2/2! + 4*x^3/3! - 27*x^4/4! + .... - Peter Bala, Jun 12 2013
E.g.f.: 1 + Series_Reversion( (1+x)*log(1+x) ). - Paul D. Hanna, Aug 24 2016
E.g.f.: 1 + Series_Reversion( x + Sum_{n>=2} (-x)^n/(n*(n-1)) ). - Paul D. Hanna, Aug 24 2016
a(n) ~ (-1)^(n+1) * exp(-1) * n^(n-1). - Vaclav Kotesovec, Sep 22 2016
a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n-1, k-1)*n^(n-k), for n >= 1 and a(0) = 1, that is, Sum_{k=0..n}*A137452(n, k), for n >= 0. - Wolfdieter Lang, Apr 11 2023

A060281 Triangle T(n,k) read by rows giving number of labeled mappings (or functional digraphs) from n points to themselves (endofunctions) with exactly k cycles, k=1..n.

Original entry on oeis.org

1, 3, 1, 17, 9, 1, 142, 95, 18, 1, 1569, 1220, 305, 30, 1, 21576, 18694, 5595, 745, 45, 1, 355081, 334369, 113974, 18515, 1540, 63, 1, 6805296, 6852460, 2581964, 484729, 49840, 2842, 84, 1, 148869153, 158479488, 64727522, 13591116, 1632099, 116172, 4830, 108, 1
Offset: 1

Views

Author

Vladeta Jovovic, Apr 09 2001

Keywords

Comments

Also called sagittal graphs.
T(n,k)=1 iff n=k (counts the identity mapping of [n]). - Len Smiley, Apr 03 2006
Also the coefficients of the tree polynomials t_{n}(y) defined by (1-T(z))^(-y) = Sum_{n>=0} t_{n}(y) (z^n/n!) where T(z) is Cayley's tree function T(z) = Sum_{n>=1} n^(n-1) (z^n/n!) giving the number of labeled trees A000169. - Peter Luschny, Mar 03 2009

Examples

			Triangle T(n,k) begins:
        1;
        3,       1;
       17,       9,       1;
      142,      95,      18,      1;
     1569,    1220,     305,     30,     1;
    21576,   18694,    5595,    745,    45,    1;
   355081,  334369,  113974,  18515,  1540,   63,  1;
  6805296, 6852460, 2581964, 484729, 49840, 2842, 84, 1;
  ...
T(3,2)=9: (1,2,3)--> [(2,1,3),(3,2,1),(1,3,2),(1,1,3),(1,2,1), (1,2,2),(2,2,3),(3,2,3),(1,3,3)].
From _Peter Luschny_, Mar 03 2009: (Start)
  Tree polynomials (with offset 0):
  t_0(y) = 1;
  t_1(y) = y;
  t_2(y) = 3*y + y^2;
  t_3(y) = 17*y + 9*y^2 + y^3; (End)
		

References

  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983.
  • W. Szpankowski. Average case analysis of algorithms on sequences. John Wiley & Sons, 2001. - Peter Luschny, Mar 03 2009

Crossrefs

Row sums: A000312.
Main diagonal and first lower diagonal give: A000012, A045943.

Programs

  • Magma
    A060281:= func< n,k | (&+[Binomial(n-1,j)*n^(n-1-j)*(-1)^(k+j+1)*StirlingFirst(j+1,k): j in [0..n-1]]) >;
    [A060281(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Nov 06 2024
    
  • Maple
    with(combinat):T:=array(1..8,1..8):for m from 1 to 8 do for p from 1 to m do T[m,p]:=sum(binomial(m-1,k)*m^(m-1-k)*(-1)^(p+k+1)*stirling1(k+1,p),k=0..m-1); print(T[m,p]) od od; # Len Smiley, Apr 03 2006
    From Peter Luschny, Mar 03 2009: (Start)
    T := z -> sum(n^(n-1)*z^n/n!,n=1..16):
    p := convert(simplify(series((1-T(z))^(-y),z,12)),'polynom'):
    seq(print(coeff(p,z,i)*i!),i=0..8); (End)
  • Mathematica
    t=Sum[n^(n-1) x^n/n!,{n,1,10}];
    Transpose[Table[Rest[Range[0, 10]! CoefficientList[Series[Log[1/(1 - t)]^n/n!, {x, 0, 10}], x]], {n,1,10}]]//Grid (* Geoffrey Critzer, Mar 13 2011*)
    Table[k! SeriesCoefficient[1/(1 + ProductLog[-t])^x, {t, 0, k}, {x, 0, j}], {k, 10}, {j, k}] (* Jan Mangaldan, Mar 02 2013 *)
  • SageMath
    @CachedFunction
    def A060281(n,k): return sum(binomial(n-1,j)*n^(n-1-j)*stirling_number1(j+1,k) for j in range(n))
    flatten([[A060281(n,k) for k in range(1,n+1)] for n in range(1,13)]) # G. C. Greubel, Nov 06 2024

Formula

E.g.f.: 1/(1 + LambertW(-x))^y.
T(n,k) = Sum_{j=0..n-1} C(n-1,j)*n^(n-1-j)*(-1)^(k+j+1)*A008275(j+1,k) = Sum_{j=0..n-1} binomial(n-1,j)*n^(n-1-j)*s(j+1,k). [Riordan] (Note: s(m,p) denotes signless Stirling cycle number (first kind), A008275 is the signed triangle.) - Len Smiley, Apr 03 2006
T(2*n, n) = A273442(n), n >= 1. - Alois P. Heinz, May 22 2016
From Alois P. Heinz, Dec 17 2021: (Start)
Sum_{k=1..n} k * T(n,k) = A190314(n).
Sum_{k=1..n} (-1)^(k+1) * T(n,k) = A000169(n) for n>=1. (End)

A089072 Triangle read by rows: T(n,k) = k^n, n >= 1, 1 <= k <= n.

Original entry on oeis.org

1, 1, 4, 1, 8, 27, 1, 16, 81, 256, 1, 32, 243, 1024, 3125, 1, 64, 729, 4096, 15625, 46656, 1, 128, 2187, 16384, 78125, 279936, 823543, 1, 256, 6561, 65536, 390625, 1679616, 5764801, 16777216, 1, 512, 19683, 262144, 1953125, 10077696, 40353607, 134217728, 387420489
Offset: 1

Views

Author

Alford Arnold, Dec 04 2003

Keywords

Comments

T(n, k) = number of mappings from an n-element set into a k-element set. - Clark Kimberling, Nov 26 2004
Let S be the semigroup of (full) transformations on [n]. Let a be in S with rank(a) = k. Then T(n,k) = |a S|, the number of elements in the right principal ideal generated by a. - Geoffrey Critzer, Dec 30 2021
From Manfred Boergens, Jun 23 2024: (Start)
In the following two comments the restriction k<=n can be lifted, allowing all k>=1.
T(n,k) is the number of n X k binary matrices with row sums = 1.
T(n,k) is the number of coverings of [n] by tuples (A_1,...,A_k) in P([n])^k with disjoint A_j, with P(.) denoting the power set.
For nonempty A_j see A019538.
For tuples with "disjoint" dropped see A092477.
For tuples with nonempty A_j and with "disjoint" dropped see A218695. (End)

Examples

			Triangle begins:
  1;
  1,  4;
  1,  8,  27;
  1, 16,  81,  256;
  1, 32, 243, 1024,  3125;
  1, 64, 729, 4096, 15625, 46656;
  ...
		

Crossrefs

Related to triangle of Eulerian numbers A008292.

Programs

  • Haskell
    a089072 = flip (^)
    a089072_row n = map (a089072 n) [1..n]
    a089072_tabl = map a089072_row [1..]  -- Reinhard Zumkeller, Mar 18 2013
    
  • Magma
    [k^n: k in [1..n], n in [1..12]]; // G. C. Greubel, Nov 01 2022
    
  • Mathematica
    Column[Table[k^n, {n, 8}, {k, n}], Center] (* Alonso del Arte, Nov 14 2011 *)
  • SageMath
    flatten([[k^n for k in range(1,n+1)] for n in range(1,12)]) # G. C. Greubel, Nov 01 2022

Formula

Sum_{k=1..n} T(n, k) = A031971(n).
T(n, n) = A000312(n).
T(2*n, n) = A062206(n).
a(n) = (n + T*(1-T)/2)^T, where T = round(sqrt(2*n),0). - Gerald Hillier, Apr 12 2015
T(n,k) = A051129(n,k). - R. J. Mathar, Dec 10 2015
T(n,k) = Sum_{i=0..k} Stirling2(n,i)*binomial(k,i)*i!. - Geoffrey Critzer, Dec 30 2021
From G. C. Greubel, Nov 01 2022: (Start)
T(n, n-1) = A007778(n-1), n >= 2.
T(n, n-2) = A008788(n-2), n >= 3.
T(2*n+1, n) = A085526(n).
T(2*n-1, n) = A085524(n).
T(2*n-1, n-1) = A085526(n-1), n >= 2.
T(3*n, n) = A083282(n).
Sum_{k=1..n} (-1)^k * T(n, k) = (-1)^n * A120485(n).
Sum_{k=1..floor(n/2)} T(n-k, k) = A226065(n).
Sum_{k=1..floor(n/2)} T(n, k) = A352981(n).
Sum_{k=1..floor(n/3)} T(n, k) = A352982(n). (End)

Extensions

More terms and better definition from Herman Jamke (hermanjamke(AT)fastmail.fm), Jul 10 2004
Offset corrected by Reinhard Zumkeller, Mar 18 2013

A245732 Number T(n,k) of endofunctions on [n] such that at least one preimage with cardinality >=k exists and a nonempty preimage of j implies that all i<=j have preimages with cardinality >=k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 4, 3, 1, 27, 13, 1, 1, 256, 75, 7, 1, 1, 3125, 541, 21, 1, 1, 1, 46656, 4683, 141, 21, 1, 1, 1, 823543, 47293, 743, 71, 1, 1, 1, 1, 16777216, 545835, 5699, 183, 71, 1, 1, 1, 1, 387420489, 7087261, 42241, 2101, 253, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 30 2014

Keywords

Comments

T(0,0) = 1 by convention.
In general, column k > 1 is asymptotic to n! / ((1+r^(k-1)/(k-1)!) * r^(n+1)), where r is the root of the equation 2 - exp(r) + Sum_{j=1..k-1} r^j/j! = 0. - Vaclav Kotesovec, Aug 02 2014

Examples

			Triangle T(n,k) begins:
0 :         1;
1 :         1,      1;
2 :         4,      3,    1;
3 :        27,     13,    1,   1;
4 :       256,     75,    7,   1,  1;
5 :      3125,    541,   21,   1,  1, 1;
6 :     46656,   4683,  141,  21,  1, 1, 1;
7 :    823543,  47293,  743,  71,  1, 1, 1, 1;
8 :  16777216, 545835, 5699, 183, 71, 1, 1, 1, 1;
		

Crossrefs

Column k=0 gives A000312.
Columns k=1-10 give (for n>0): A000670, A032032, A102233, A232475, A245790, A245791, A245792, A245793, A245794, A245795.
T(2n,n) gives A244174(n) or 1+A007318(2n,n) = 1+A000984(n) for n>0.
Cf. A245733.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1,
          add(b(n-j, k)*binomial(n, j), j=k..n))
        end:
    T:= (n, k)-> `if`(k=0, n^n, `if`(n=0, 0, b(n, k))):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n-j, k]*Binomial[n, j], {j, k, n}]]; T[n_, k_] := If[k == 0, n^n, If[n == 0, 0, b[n, k]]]; T[0, 0] = 1; Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 05 2015, after Alois P. Heinz *)

Formula

E.g.f. (for column k > 0): 1/(2 -exp(x) +Sum_{j=1..k-1} x^j/j!) -1. - Vaclav Kotesovec, Aug 02 2014

A000435 Normalized total height of all nodes in all rooted trees with n labeled nodes.

Original entry on oeis.org

0, 1, 8, 78, 944, 13800, 237432, 4708144, 105822432, 2660215680, 73983185000, 2255828154624, 74841555118992, 2684366717713408, 103512489775594200, 4270718991667353600, 187728592242564421568, 8759085548690928992256, 432357188322752488126152, 22510748754252398927872000
Offset: 1

Views

Author

Keywords

Comments

This is the sequence that started it all: the first sequence in the database!
The height h(V) of a node V in a rooted tree is its distance from the root. a(n) = Sum_{all nodes V in all n^(n-1) rooted trees on n nodes} h(V)/n.
In the trees which have [0, n-1] = (0, 1, ..., n-1) as their ordered set of nodes, the number of nodes at distance i from node 0 is f(n,i) = (n-1)...(n-i)(i+1)n^(j-1), 0 <= i < n-1, i+j = n-1 (and f(n,n-1) = (n-1)!): (n-1)...(n-i) counts the words coding the paths of length i from any node to 0, n^(j-1) counts the Pruefer codes of the rest, words build by iterated deletion of the greater node of degree 1 ... except the last one, (i+1), necessary pointing at the path. If g(n,i) = (n-1)...(n-i)n^j, i+j = n-1, f(n,i) = g(n,i) - g(n,i+1), g(n,i) = Sum_{k>=i} f(n,k), the sequence is Sum_{i=1..n-1} g(n,i). - Claude Lenormand (claude.lenormand(AT)free.fr), Jan 26 2001
If one randomly selects one ball from an urn containing n different balls, with replacement, until exactly one ball has been selected twice, the probability that this ball was also the second ball to be selected once is a(n)/n^n. See also A001865. - Matthew Vandermast, Jun 15 2004
a(n) is the number of connected endofunctions with no fixed points. - Geoffrey Critzer, Dec 13 2011
a(n) is the number of weakly connected simple digraphs on n labeled nodes where every node has out-degree 1. A digraph where all out-degrees are 1 can be called a functional digraph due to the correspondence with endofunctions. - Andrew Howroyd, Feb 06 2024

Examples

			For n = 3 there are 3^2 = 9 rooted labeled trees on 3 nodes, namely (with o denoting a node, O the root node):
   o
   |
   o     o   o
   |      \ /
   O       O
The first can be labeled in 6 ways and contains nodes at heights 1 and 2 above the root, so contributes 6*(1+2) = 18 to the total; the second can be labeled in 3 ways and contains 2 nodes at height 1 above the root, so contributes 3*2=6 to the total, giving 24 in all. Dividing by 3 we get a(3) = 24/3 = 8.
For n = 4 there are 4^3 = 64 rooted labeled trees on 4 nodes, namely (with o denoting a node, O the root node):
   o
   |
   o     o        o   o
   |     |         \ /
   o     o   o      o     o o o
   |      \ /       |      \|/
   O       O        O       O
  (1)     (2)      (3)     (4)
Tree (1) can be labeled in 24 ways and contains nodes at heights 1, 2, 3 above the root, so contributes 24*(1+2+3) = 144 to the total;
tree (2) can be labeled in 24 ways and contains nodes at heights 1, 1, 2 above the root, so contributes 24*(1+1+2) = 96 to the total;
tree (3) can be labeled in 12 ways and contains nodes at heights 1, 2, 2 above the root, so contributes 12*(1+2+2) = 60 to the total;
tree (4) can be labeled in 4 ways and contains nodes at heights 1, 1, 1 above the root, so contributes 4*(1+1+1) = 12 to the total;
giving 312 in all. Dividing by 4 we get a(4) = 312/4 = 78.
		

References

  • 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

Cf. A001863, A001864, A001854, A002862 (unlabeled version), A234953, A259334.
Column k=1 of A350452.

Programs

  • Maple
    A000435 := n-> (n-1)!*add (n^k/k!, k=0..n-2);
    seq(simplify((n-1)*GAMMA(n-1,n)*exp(n)),n=1..20); # Vladeta Jovovic, Jul 21 2005
  • Mathematica
    f[n_] := (n - 1)! Sum [n^k/k!, {k, 0, n - 2}]; Array[f, 18] (* Robert G. Wilson v, Aug 10 2010 *)
    nx = 18; Rest[ Range[0, nx]! CoefficientList[ Series[ LambertW[-x] - Log[1 + LambertW[-x]], {x, 0, nx}], x]] (* Robert G. Wilson v, Apr 13 2013 *)
  • PARI
    x='x+O('x^30); concat(0, Vec(serlaplace(lambertw(-x)-log(1+lambertw(-x))))) \\ Altug Alkan, Sep 05 2018
    
  • PARI
    A000435(n)=(n-1)*A001863(n) \\ M. F. Hasler, Dec 10 2018
    
  • Python
    from math import comb
    def A000435(n): return ((sum(comb(n,k)*(n-k)**(n-k)*k**k for k in range(1,(n+1>>1)))<<1) + (0 if n&1 else comb(n,m:=n>>1)*m**n))//n # Chai Wah Wu, Apr 25-26 2023

Formula

a(n) = (n-1)! * Sum_{k=0..n-2} n^k/k!.
a(n) = A001864(n)/n.
E.g.f.: LambertW(-x) - log(1+LambertW(-x)). - Vladeta Jovovic, Apr 10 2001
a(n) = A001865(n) - n^(n-1).
a(n) = A001865(n) - A000169(n). - Geoffrey Critzer, Dec 13 2011
a(n) ~ sqrt(Pi/2)*n^(n-1/2). - Vaclav Kotesovec, Aug 07 2013
a(n)/A001854(n) ~ 1/2 [See Renyi-Szekeres, (4.7)]. Also a(n) = Sum_{k=0..n-1} k*A259334(n,k). - David desJardins, Jan 20 2017
a(n) = (n-1)*A001863(n). - M. F. Hasler, Dec 10 2018

Extensions

Additional references from Valery A. Liskovets
Editorial changes by N. J. A. Sloane, Feb 03 2012
Edited by M. F. Hasler, Dec 10 2018

A007830 a(n) = (n+3)^n.

Original entry on oeis.org

1, 4, 25, 216, 2401, 32768, 531441, 10000000, 214358881, 5159780352, 137858491849, 4049565169664, 129746337890625, 4503599627370496, 168377826559400929, 6746640616477458432, 288441413567621167681, 13107200000000000000000, 630880792396715529789561
Offset: 0

Views

Author

Peter J. Cameron, Mar 15 1996

Keywords

Comments

a(n-2) is the number of trees with n+1 unlabeled vertices and n labeled edges for n > 1. - Christian G. Bower, 12/99 [corrected by Jonathan Vos Post, Sep 22 2012]
a(n) is the number of nonequivalent primitive meromorphic functions with one pole of order n+3 on a Riemann surface of genus 0. - Noam Katz (noamkj(AT)hotmail.com), Mar 30 2001
Pikhurko writes: "Cameron demonstrated that the total number of edge-labeled trees with n >= 2 edges is (n+1)^(n-2) by showing that the number of vertex-labeled trees of size n is n+1 times larger than the number of edge-labeled ones." - Jonathan Vos Post, Sep 22 2012
With offset 1, a(n) is the number of ways to build a rooted labeled forest with some (possibly all or none) of the nodes from {1,2,...,n} and then build another forest with the remaining nodes. - Geoffrey Critzer, May 10 2013

References

  • M. Shapiro, B. Shapiro and A. Vainshtein - Ramified coverings of S^2 with one degenerate branching point and enumeration of edge-ordered graphs, Amer. Math. Soc. Transl., Vol. 180 (1997), pp. 219-227.
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.27.

Crossrefs

Programs

  • Magma
    [(n+3)^n: n in [0..20]]; // G. C. Greubel, Mar 06 2020
    
  • Maple
    A007830:=n->(n+3)^n; seq(A007830(n), n=0..20);
    T := -LambertW(-x): ser := series(exp(3*T)/(1-T), x, 20):
    seq(n!*coeff(ser, x, n), n = 0..18); # Peter Luschny, Jan 20 2023
  • Mathematica
    Table[(n+3)^n, {n, 0, 18}]
  • PARI
    a(n)=(n+3)^n \\ Charles R Greathouse IV, Feb 06 2017
    
  • Sage
    [(n+3)^n for n in (0..20)] # G. C. Greubel, Mar 06 2020

Formula

E.g.f. for b(n) = a(n-3): T(x) - (3/4)*T^2(x) + (1/6)*T^3(x), where T(x) is Euler's tree function (see A000169). - Len Smiley, Nov 17 2001
E.g.f.: -LambertW(-x)^3/(x^3 * (1+LambertW(-x))). - Vladeta Jovovic, Nov 07 2003
With offset 1: E.g.f.: exp(T(x))^2/2 where T(x) is the e.g.f. for A000169. - Geoffrey Critzer, May 10 2013
E.g.f.: (1/2)*d/dx (LambertW(-x)/(-x))^2. - Wolfdieter Lang, Oct 25 2022

Extensions

More terms from Wesley Ivan Hurt, May 05 2014

A069856 E.g.f.: exp(x)/(1+LambertW(x)).

Original entry on oeis.org

1, 0, 3, -17, 169, -2079, 31261, -554483, 11336753, -262517615, 6791005621, -194103134499, 6074821125385, -206616861429575, 7588549099814957, -299320105069298459, 12619329503201165281, -566312032570838608863, 26952678355224681891685
Offset: 0

Views

Author

Joe Keane (jgk(AT)jgk.org), May 03 2002

Keywords

Comments

Inverse binomial transform of A000312. - Tilman Neumann, Dec 13 2008
The |a(n)| is the number of functions f:{1,2,...,n}->{1,2,...,n} such that the digraph representation of f has no isolated vertices. - Geoffrey Critzer, Nov 13 2011

References

  • sci.math article 3CBC2B66.224E(AT)olympus.mons

Crossrefs

Cf. A086331.
Cf. A350212.

Programs

  • Mathematica
    t = Sum[n^(n - 1) x^n/n!, {n, 1, 20}]; Range[0, 20]! CoefficientList[Series[Exp[-x]/(1 - t), {x, 0, 20}], x] (* Geoffrey Critzer, Nov 13 2011 *)
    Range[0, 18]! CoefficientList[ Series[ Exp[x]/(1 + LambertW[x]), {x, 0, 18}], x] (* Robert G. Wilson v, Nov 28 2012 *)
  • PARI
    my(x='x+O('x^20)); Vec(serlaplace(exp(x)/(1+lambertw(x)))) \\ G. C. Greubel, Jun 11 2017

Formula

a(n) = n! * Sum_{k=0..n} (-1)^k*k^k/(k!*(n - k)!).
E.g.f. for absolute value of {a(n)}: exp(C(x)-x) where C(x) is the e.g.f for A001865. - Geoffrey Critzer, Nov 13 2011, corrected by Vaclav Kotesovec, Nov 27 2012
abs(a(n)) ~ (exp(1)*n-1/2)/exp(1+exp(-1)) * n^(n-1). - Vaclav Kotesovec, Nov 27 2012
a(n) = (-1)^n * A350212(n,0). - Alois P. Heinz, Dec 19 2021

A174824 a(n) = period of the sequence {m^m, m >= 1} modulo n.

Original entry on oeis.org

1, 2, 6, 4, 20, 6, 42, 8, 18, 20, 110, 12, 156, 42, 60, 16, 272, 18, 342, 20, 42, 110, 506, 24, 100, 156, 54, 84, 812, 60, 930, 32, 330, 272, 420, 36, 1332, 342, 156, 40, 1640, 42, 1806, 220, 180, 506, 2162, 48, 294, 100, 816, 156, 2756, 54, 220, 168, 342
Offset: 1

Views

Author

Keywords

Comments

This is a divisibility sequence: if n divides m, a(n) divides a(m).
We have the equality n = a(n) for numbers n in A124240, which is related to Carmichael's function (A002322). The largest values of a(n) occur when n is prime, in which case a(n) = n*(n-1). - T. D. Noe, Feb 21 2014

Examples

			For n=3, 1^1 == 1 (mod 3), 2^2 == 1 (mod 3), 3^3 == 0 (mod 3), etc. The sequence of residues 1, 1, 0, 1, 2, 0, 1, 1, 0, ... has period 6, so a(3) = 6. - _Michael B. Porter_, Mar 13 2018
		

Crossrefs

Programs

  • Mathematica
    Table[LCM[n, CarmichaelLambda[n]], {n, 100}] (* T. D. Noe, Feb 20 2014 *)
  • PARI
    a(n)=local(ps);ps=factor(n)[,1]~;for(k=1,#ps,n=lcm(n,ps[k]-1));n
    
  • PARI
    a(n) = lcm(n, lcm(znstar(n)[2])); \\ Michel Marcus, Mar 18 2016; corrected by Michel Marcus, Nov 13 2019
    
  • PARI
    apply( {A174824(n)=lcm(lcm([p-1|p<-factor(n)[,1]]),n)}, [1..99]) \\ [...] = znstar(n)[2], but 3x faster. - M. F. Hasler, Nov 13 2019

Formula

a(n) = lcm(n, A173614(n)) = lcm(n, A002322(n)) = lcm(n, A011773(n)).
If n and m are relatively prime, a(n*m) = lcm(a(n), a(m)); a(p^k) = (p-1)*p^k for p prime and k > 0.
a(n) = n*A268336(n). - M. F. Hasler, Nov 13 2019
Previous Showing 41-50 of 605 results. Next