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-6 of 6 results.

A062971 a(n) = (2*n)^n.

Original entry on oeis.org

1, 2, 16, 216, 4096, 100000, 2985984, 105413504, 4294967296, 198359290368, 10240000000000, 584318301411328, 36520347436056576, 2481152873203736576, 182059119829942534144, 14348907000000000000000, 1208925819614629174706176, 108428035605965932354207744
Offset: 0

Views

Author

Jason Earls, Jul 23 2001

Keywords

Comments

Shift n^n left n bits.
Also the number of input-closed output-Boolean Moore machines on n states. - David Spivak, Feb 14 2020

Examples

			n=3: 3^3 shifted three bits to the left is 216 because 3^3 in binary is: [1, 1, 0, 1, 1] and 216 in binary is: [1, 1, 0, 1, 1, 0, 0, 0].
		

Crossrefs

Column k=1 of A246070.
Cf. A019762 (2*e).

Programs

  • Maple
    a:= n-> (2*n)^n: seq(a(n), n=0..15); # Zerinvary Lajos, Jan 01 2009
  • Mathematica
    Join[{1}, Table[(2*n)^n, {n,1,50}]] (* G. C. Greubel, Nov 10 2017 *)
  • PARI
    for(n=0, 20, print1(shift(n^n,n), ", "))

Formula

E.g.f.: -(2*x*e^(-W(-2*x)))/(W(-2*x)*(W(-2*x)+1)), W(x) is Lambert's function. - Vladimir Kruchinin, May 09 2013
E.g.f.: 1/(1 + LambertW(-2*x)). - Vaclav Kotesovec, Dec 21 2014
Limit_{n->oo} a(n+1)/(n*a(n)) = 2*e. - Stefano Spezia, Mar 13 2023

Extensions

New description from Vladeta Jovovic, Mar 08 2003

A085534 a(n) = (2n)^(2n).

Original entry on oeis.org

1, 4, 256, 46656, 16777216, 10000000000, 8916100448256, 11112006825558016, 18446744073709551616, 39346408075296537575424, 104857600000000000000000000, 341427877364219557396646723584, 1333735776850284124449081472843776, 6156119580207157310796674288400203776
Offset: 0

Views

Author

N. J. A. Sloane, Jul 05 2003

Keywords

Comments

All terms are both perfect squares and numbers of the form n^n. - William Boyles, Jul 31 2015
Intersection of A000290 and A000312. - Michel Marcus, Aug 04 2015
Intersection of A005843 and A000312. - Robert Israel, Aug 04 2015
The number of sequences of length 2n using 2n symbols. - Washington Bomfim, Jan 14 2020

Crossrefs

Column k=0 of A246070.

Programs

Formula

a(n) = A000312(2*n). - Michel Marcus, Jul 31 2015
a(n) = A062971(n)^2. - Michel Marcus, Aug 04 2015
a(n) = [x^(2*n)] 1/(1 - 2*n*x). - Ilya Gutkovskiy, Oct 10 2017
Sum_{n>=0} 1/a(n) = 1 + (A073009-A083648)/2 = 1.2539277431... . - Amiram Eldar, May 17 2022

A246072 Number A(n,k) of permutations p on [2n] satisfying p^k(i) = i for all i in [n]; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 2, 1, 1, 24, 1, 2, 2, 720, 1, 1, 10, 6, 40320, 1, 2, 10, 84, 24, 3628800, 1, 1, 16, 108, 1032, 120, 479001600, 1, 2, 2, 264, 1800, 17040, 720, 87178291200, 1, 1, 18, 150, 6672, 47520, 359280, 5040, 20922789888000
Offset: 0

Views

Author

Alois P. Heinz, Aug 12 2014

Keywords

Comments

Column k=2 is n! * A005425(n), column k=3 is n! * A242054(n). - Vaclav Kotesovec, Aug 13 2014

Examples

			A(2,3) = 10: (1,2,3,4), (1,2,4,3), (1,3,4,2), (1,4,2,3), (2,3,1,4), (2,4,3,1), (3,1,2,4), (3,2,4,1), (4,1,3,2), (4,2,1,3).
a(2,4) = 16: (1,2,3,4), (1,2,4,3), (1,3,2,4), (1,4,3,2), (2,1,3,4), (2,1,4,3), (2,3,4,1), (2,4,1,3), (3,1,4,2), (3,2,1,4), (3,4,1,2), (3,4,2,1), (4,1,2,3), (4,2,3,1), (4,3,1,2), (4,3,2,1).
A(2,5) = 2: (1,2,3,4), (1,2,4,3).
A(3,1) = 6: (1,2,3,4,5,6), (1,2,3,4,6,5), (1,2,3,5,4,6), (1,2,3,5,6,4), (1,2,3,6,4,5), (1,2,3,6,5,4).
Square array A(n,k) begins:
0 :        1,   1,     1,     1,      1,      1, ...
1 :        2,   1,     2,     1,      2,      1, ...
2 :       24,   2,    10,    10,     16,      2, ...
3 :      720,   6,    84,   108,    264,    150, ...
4 :    40320,  24,  1032,  1800,   6672,   2424, ...
5 :  3628800, 120, 17040, 47520, 241440, 109200, ...
		

Crossrefs

Columns k=0-1 give: A010050, A000142. Main diagonal gives A246073.
Cf. A005425, A242054, A246070 (the same for endofunctions).

Programs

  • Maple
    with(numtheory): with(combinat): M:=multinomial:
    b:= proc(n, k, p) local l, g; l, g:= sort([divisors(p)[]]),
          proc(k, m, i, t) option remember; local d, j; d:= l[i];
            `if`(i=1, m!, add(M(k, k-(d-t)*j, (d-t)$j)/j!*
             (d-1)!^j *M(m, m-t*j, t$j) *g(k-(d-t)*j, m-t*j,
            `if`(d-t=1, [i-1, 0], [i, t+1])[]), j=0..min(k/(d-t),
            `if`(t=0, [][], m/t))))
          end; g(k, n-k, nops(l), 0)
        end:
    A:= (n, k)-> `if`(k=0, (2*n)!, b(2*n, n, k)):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!); M = multinomial; b[n_, k_, p_] := b[n, k, p] = Module[{l, g}, l = Sort[Divisors[p]]; g[k0_, m_, i_, t_] := g[k0, m, i, t] = Module[{d}, d = l[[i]]; If[i == 1, m!, Sum[ M[k0, Join[{k0-(d-t)*j}, Table[d-t, {j}]]]/j!*(d-1)!^j*M[m, Join[{m-t*j}, Table[t, {j}]]]*If[d-t == 1, g[k0-(d-t)*j, m-t*j, i-1, 0], g[k0-(d-t)*j, m-t*j, i, t+1]], {j, 0, Min[k0/(d-t), If[t == 0, Infinity, m/t]]}]]]; g[k, n-k, Length[l], 0]]; A[n_, k_] := If[k == 0, (2*n)!, b[2*n, n, k]]; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Jan 06 2015, after Alois P. Heinz *)

A245141 Number of endofunctions f on [2n] that are self-inverse on [n].

Original entry on oeis.org

1, 3, 50, 1626, 83736, 6026120, 571350096, 67996818960, 9862902275456, 1700092943088768, 342087177215788800, 79115601821198404352, 20779757607847901690880, 6133520505473954148381696, 2017134796016735182500521984, 733523863838078950241395968000
Offset: 0

Views

Author

Alois P. Heinz, Jul 21 2014

Keywords

Comments

a(n) counts endofunctions f:{1,...,2n}-> {1,...,2n} with f(f(i))=i for all i in {1,...,n}.

Examples

			a(1) = 3: (1,1), (1,2), (2,1).
		

Crossrefs

Column k=2 of A246070.

Programs

  • Maple
    g:= proc(n) g(n):= `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:
    a:= n-> add(binomial(n, i)^2*i!*g(n-i)*(2*n)^(n-i), i=0..n):
    seq(a(n), n=0..20);
  • Mathematica
    Join[{1}, Table[n! * Sum[Binomial[n,k] * 2^k * n^k* Sum[1/((k - 2*j)!*2^j*j!), {j, 0, Floor[k/2]}], {k, 0, n}], {n, 1, 20}]] (* Vaclav Kotesovec, Dec 05 2021 *)

Formula

a(n) = Sum_{i=0..n} C(n,i)^2 * i! * A000085(n-i) * (2*n)^(n-i).
a(n) = A245348(2n,n).

A245959 Number of endofunctions f on [2n] satisfying f^3(i) = i for all i in [n].

Original entry on oeis.org

1, 2, 36, 1440, 84624, 7675200, 962250624, 151851992544, 30421572307200, 7430515709340672, 2142144445293849600, 727442024443449689088, 285148327160858698469376, 127152465871110917459189760, 64226006581334387301393186816, 36322574197169989225245335040000
Offset: 0

Views

Author

Alois P. Heinz, Aug 08 2014

Keywords

Crossrefs

Cf. A245958.
Column k=3 of A246070.

Programs

  • Maple
    with(combinat): M:=multinomial:
    T:= proc(n, k) local l, g; l, g:= [1, 3],
          proc(k, m, i, t) option remember; local d, j; d:= l[i];
            `if`(i=1, n^m, add(M(k, k-(d-t)*j, (d-t)$j)/j!*
             (d-1)!^j *M(m, m-t*j, t$j) *g(k-(d-t)*j, m-t*j,
            `if`(d-t=1, [i-1, 0], [i, t+1])[]), j=0..min(k/(d-t),
            `if`(t=0, [][], m/t))))
          end; g(k, n-k, nops(l), 0)
        end:
    a:= n-> T(2*n, n):
    seq(a(n), n=0..20);
  • Mathematica
    M[n_, m_, k_List] := n!/Times @@ (Join[{m}, k]!);
    T[0, 0] = 1; T[n_, k_] := T[n, k] = Module[{l = {1, 3}, g}, g[k0_, m_, {i_, t_}] := g[k0, m, i, t]; g[k0_, m_, i_, t_] := g[k0, m, i, t] = Module[ {d}, d = l[[i]]; If[i == 1, n^m, Sum[M[k0, k0 - (d - t)*j, Table[(d - t), {j}]]/j!*(d - 1)!^j*M[m, m - t*j, Table[t, {j}]]*g[k0 - (d - t)*j, m - t*j, If[d - t == 1, {i - 1, 0}, {i, t + 1}]], {j, 0, Min[k0/(d - t), If[t == 0, Infinity, m/t]]}]]]; g[k, n - k, Length[l], 0]];
    a[n_] := T[2 n, n];
    a /@ Range[0, 20] (* Jean-François Alcover, Oct 03 2019, after Alois P. Heinz *)

Formula

a(n) = A245958(2n,n).

A246071 Number of endofunctions f on [2n] satisfying f^n(i) = i for all i in [n].

Original entry on oeis.org

1, 2, 50, 1440, 215760, 11218000, 8859219696, 549669946784, 797599992178688, 195297824029876992, 225830701916170080000, 33538442785393084937728, 478648537323384927696592896, 26649057768458576467019134976, 207869233649005397144301933676544
Offset: 0

Views

Author

Alois P. Heinz, Aug 12 2014

Keywords

Crossrefs

Cf. A246070.

Programs

  • Maple
    with(numtheory): with(combinat): M:=multinomial:
    b:= proc(n, k, p) local l, g; l, g:= sort([divisors(p)[]]),
          proc(k, m, i, t) option remember; local d, j; d:= l[i];
            `if`(i=1, n^m, add(M(k, k-(d-t)*j, (d-t)$j)/j!*
             (d-1)!^j *M(m, m-t*j, t$j) *g(k-(d-t)*j, m-t*j,
            `if`(d-t=1, [i-1, 0], [i, t+1])[]), j=0..min(k/(d-t),
            `if`(t=0, [][], m/t))))
          end; g(k, n-k, nops(l), 0)
        end:
    a:= n-> `if`(n=0, 1, b(2*n, n$2)):
    seq(a(n), n=0..20);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    M = multinomial;
    b[n_, k0_, p_] := Module[{l, g}, l = Divisors[p];
       g[k_, m_, i_, t_] := g[k, m, i, t] = Module[{d, j}, d = l[[i]];
       If[i == 1, If[m == 0, 1, n^m],  Sum[M[k, Join[{k - (d - t)*j},
       Table[d - t, {j}]]]/j!*If[j == 0, 1, (d - 1)!^j]*M[m, Join[{m - t*j},
       Array[t&, j]]]*g[k - (d - t)*j, m - t*j, Sequence @@
       If[d - t == 1, {i - 1, 0}, {i, t + 1}]], {j, 0, Min[k/(d - t),
       If[t == 0, {}, m/t]]}]]];
       g[k0, n - k0, Length[l], 0]];
    a[n_] := If[n == 0, 1, b[2*n, n, n]];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jun 27 2022, after Alois P. Heinz *)

Formula

a(n) = A246070(2n,n).
Showing 1-6 of 6 results.