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

A273994 Number of endofunctions on [n] whose cycle lengths are Fibonacci numbers.

Original entry on oeis.org

1, 1, 4, 27, 250, 2975, 43296, 744913, 14797036, 333393345, 8403026320, 234300271811, 7161316358616, 238108166195263, 8556626831402560, 330494399041444425, 13654219915946513296, 600870384794864432897, 28060233470995898505024, 1386000542545570348128235
Offset: 0

Views

Author

Alois P. Heinz, Jun 06 2016

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local r, f, g;
          if n=0 then 1 else r, f, g:= $0..2;
          while f<=n do r:= r+(f-1)!*b(n-f)*
             binomial(n-1, f-1); f, g:= g, f+g
          od; r fi
        end:
    a:= n-> add(b(j)*n^(n-j)*binomial(n-1, j-1), j=0..n):
    seq(a(n), n=0..20);
  • Mathematica
    b[n_] := b[n] = Module[{r, f, g}, If[n == 0, 1, {r, f, g} = {0, 1, 2}; While[f <= n, r = r + (f - 1)!*b[n - f]*Binomial[n - 1, f - 1]; {f, g} = {g, f + g}]; r]];
    a[0] = 1; a[n_] := Sum[b[j]*n^(n - j)*Binomial[n - 1, j - 1], {j, 0, n}];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jun 06 2018, from Maple *)

A273996 Number of endofunctions on [n] whose cycle lengths are factorials.

Original entry on oeis.org

1, 1, 4, 25, 218, 2451, 33952, 560407, 10750140, 235118665, 5775676496, 157448312649, 4716609543736, 154007821275595, 5443783515005760, 207093963680817511, 8436365861409555728, 366403740283162634193, 16900793597898691865920, 825115046704241167668025
Offset: 0

Views

Author

Alois P. Heinz, Jun 06 2016

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local r, f, g;
          if n=0 then 1 else r, f, g:= $0..2;
          while f<=n do r:= r+(f-1)!*b(n-f)*
             binomial(n-1, f-1); f, g:= f*g, g+1
          od; r fi
        end:
    a:= n-> add(b(j)*n^(n-j)*binomial(n-1, j-1), j=0..n):
    seq(a(n), n=0..20);
  • Mathematica
    b[n_] := b[n] = Module[{r, f, g}, If[n == 0, 1, {r, f, g} = {0, 1, 2}; While[f <= n, r = r + (f - 1)!*b[n - f]*Binomial[n - 1, f - 1]; {f, g} = {f*g, g + 1}]; r]];
    a[0] = 1; a[n_] := Sum[b[j]*n^(n - j)*Binomial[n - 1, j - 1], {j, 0, n}];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jun 06 2018, from Maple *)

A273998 Number of endofunctions on [n] whose cycle lengths are primes.

Original entry on oeis.org

1, 0, 1, 8, 75, 904, 13255, 229536, 4587961, 103971680, 2634212961, 73787255200, 2264440519891, 75563445303072, 2724356214102055, 105546202276277504, 4373078169296869425, 192970687573630633216, 9035613818754820178689, 447469496697658409400960
Offset: 0

Views

Author

Alois P. Heinz, Jun 06 2016

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local r, p;
          if n=0 then 1 else r, p:=0, 2;
          while p<=n do r:= r+(p-1)!*b(n-p)*
             binomial(n-1, p-1); p:= nextprime(p)
          od; r fi
        end:
    a:= n-> add(b(j)*n^(n-j)*binomial(n-1, j-1), j=0..n):
    seq(a(n), n=0..20);
  • Mathematica
    b[n_] := b[n] = Module[{r, p}, If[n == 0, 1, {r, p} = {0, 2}; While[p <= n, r = r + (p - 1)!*b[n - p]*Binomial[n-1, p-1]; p = NextPrime[p]]; r]];
    a[0] = 1; a[n_] := Sum[b[j]*n^(n - j)*Binomial[n - 1, j - 1], {j, 0, n}];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jun 06 2018, from Maple *)

A305824 Number of endofunctions on [n] whose cycle lengths are triangular numbers.

Original entry on oeis.org

1, 1, 3, 18, 157, 1776, 24807, 413344, 8004537, 176630400, 4374300331, 120136735104, 3623854678677, 119102912981248, 4236492477409935, 162152320065532416, 6645233337842716273, 290321208589666369536, 13469914225467040015827, 661442143465113960448000
Offset: 0

Views

Author

Alois P. Heinz, Jun 10 2018

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local r, f, g;
          if n=0 then 1 else r, f, g:=$0..2;
          while f<=n do r, f, g:= r+(f-1)!*
             b(n-f)*binomial(n-1, f-1), f+g, g+1
          od; r fi
        end:
    a:= n-> add(b(j)*n^(n-j)*binomial(n-1, j-1), j=0..n):
    seq(a(n), n=0..20);
  • Mathematica
    b[n_] := b[n] = Module[{r, f, g}, If[n == 0, 1, {r, f, g} = {0, 1, 2}; While[f <= n, {r, f, g} = {r + (f - 1)!*b[n - f]*Binomial[n - 1, f - 1], f + g, g + 1}]; r]];
    a[0] = 1; a[n_] := Sum[b[j]*n^(n - j)*Binomial[n - 1, j - 1], {j, 0, n}];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jun 15 2018, after Alois P. Heinz *)

A273997 Number of endofunctions on [n] whose cycle lengths are squares.

Original entry on oeis.org

1, 1, 3, 16, 131, 1446, 19957, 329344, 6315129, 137942380, 3382214291, 92014156224, 2751300514987, 89701699067176, 3167429783609925, 120428877629249536, 4905431165356442993, 213120603686615692176, 9837426739843075654819, 480775495859934668704000
Offset: 0

Views

Author

Alois P. Heinz, Jun 06 2016

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local r, f, g;
          if n=0 then 1 else r, f, g:=0, 1, 3;
          while f<=n do r:= r+(f-1)!*b(n-f)*
             binomial(n-1, f-1); f, g:= f+g, g+2
          od; r fi
        end:
    a:= n-> add(b(j)*n^(n-j)*binomial(n-1, j-1), j=0..n):
    seq(a(n), n=0..20);
  • Mathematica
    b[n_] := b[n] = Module[{r, f, g}, If[n == 0, 1, {r, f, g} = {0, 1, 3}; While[f <= n, r = r + (f - 1)!*b[n - f]*Binomial[n - 1, f - 1]; {f, g} = {f + g, g + 2}]; r]];
    a[0] = 1; a[n_] := Sum[b[j]*n^(n - j)*Binomial[n - 1, j - 1], {j, 0, n}];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jun 06 2018, from Maple *)

A212599 Number of functions on n labeled points to themselves (endofunctions) such that the number of cycles of f that have each even size is even.

Original entry on oeis.org

1, 1, 3, 18, 160, 1875, 27126, 466186, 9275064, 209654325, 5307031000, 148720701426, 4570816040352, 152874605142727, 5527634477245440, 214862754390554250, 8934811701563214976, 395788795274021394729, 18606559519007667893376, 925222631836457779380370, 48518852386696450625510400
Offset: 0

Views

Author

Geoffrey Critzer, May 22 2012

Keywords

Crossrefs

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(`if`(irem(j, igcd(i, 2))<>0, 0, (i-1)!^j*
          multinomial(n, n-i*j, i$j)/j!*b(n-i*j, i-1)), j=0..n/i)))
        end:
    a:= n-> add(b(j, j)*n^(n-j)*binomial(n-1, j-1), j=0..n):
    seq(a(n), n=0..25);  # Alois P. Heinz, Sep 08 2014
  • Mathematica
    nn=20;t=Sum[n^(n-1)x^n/n!,{n,1,nn}];p=Product[Cosh[t^(2i)/(2i)],{i,1,nn}];Range[0,nn]! CoefficientList[Series[((1+t)/(1-t))^(1/2) p,{x,0,nn}],x]

Formula

E.g.f.: ((1+T(x))/(1-T(x)))^(1/2) * Product_{i>=1} cosh(T(x)^(2*i)/(2*i)) where T(x) is the e.g.f. for A000169.

Extensions

Maple program fixed by Vaclav Kotesovec, Sep 13 2014

A202013 The number of functions f:{1,2,...,n}->{1,2,...,n} that have an odd number of odd length cycles and no even length cycles.

Original entry on oeis.org

0, 1, 2, 12, 100, 1120, 15606, 260344, 5056136, 112026240, 2788230250, 77009739136, 2337124786668, 77302709780608, 2767629599791070, 106631592312384000, 4398877912885363216, 193450993635808976896, 9034380526387410161874, 446519425974262943518720, 23284829853408862172112500
Offset: 0

Views

Author

Geoffrey Critzer, Dec 08 2011

Keywords

Comments

The number of endofunctions with an odd number of recurrent elements.
It appears that almost all endofunctions have an even number of recurrent elements.

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, t, add(
          `if`(j::odd, (j-1)!*b(n-j, 1-t)*
           binomial(n-1, j-1), 0), j=1..n))
        end:
    a:= n-> add(b(j, 0)*n^(n-j)*binomial(n-1, j-1), j=0..n):
    seq(a(n), n=0..20);  # Alois P. Heinz, May 20 2016
  • Mathematica
    t = Sum[n^(n - 1) x^n/n!, {n, 1, 20}]; Range[0, 20]! CoefficientList[Series[Sinh[Log[((1 + t)/(1 - t))^(1/2)]], {x, 0, 20}], x]
    CoefficientList[Series[(((1-LambertW[-x])/(1+LambertW[-x]))^(1/2))/2 - 1/(2*((1-LambertW[-x])/(1+LambertW[-x]))^(1/2)), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Sep 24 2013 *)

Formula

E.g.f.: sinh(log(((1-LambertW(-x))/(1+LambertW(-x)))^(1/2))). - corrected by Vaclav Kotesovec, Sep 24 2013
a(n) ~ n! * 2^(3/4)*Gamma(3/4)*exp(n)/(4*Pi*n^(3/4)) * (1+7*Pi/(24*Gamma(3/4)^2*sqrt(n))). - Vaclav Kotesovec, Sep 24 2013

A275385 Number of labeled functional digraphs on n nodes with only odd sized cycles and such that every vertex is at a distance of at most 1 from a cycle.

Original entry on oeis.org

1, 1, 3, 12, 73, 580, 5601, 63994, 844929, 12647016, 211616065, 3914510446, 79320037281, 1747219469164, 41569414869633, 1062343684252530, 29023112392093441, 844101839207139280, 26038508978625589377, 849150487829425227094, 29189561873274715264545
Offset: 0

Views

Author

Geoffrey Critzer, Jul 25 2016

Keywords

Comments

Equivalently, these are the functions counted by A116956 with the additional constraint that every element is mapped to a recurrent element. A recurrent element is an element on a cycle in the functional digraph.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(`if`(j::odd,
           (j-1)!*b(n-j)*binomial(n-1, j-1), 0), j=1..n))
        end:
    a:= n-> add(b(j)*j^(n-j)*binomial(n, j), j=0..n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Jul 25 2016
  • Mathematica
    nn = 20; Range[0, nn]! CoefficientList[Series[Sqrt[(1 + z*Exp[z])/(1 - z*Exp[z])], {z, 0, nn}], z]
  • PARI
    default(seriesprecision, 30);
    S=sqrt((1 + x*exp(x))/(1 - x*exp(x)));
    v=Vec(S); for(n=2,#v-1,v[n+1]*=n!); v \\ Charles R Greathouse IV, Jul 29 2016

Formula

E.g.f.: sqrt((1 + z*exp(z))/(1 - z*exp(z))).
Exponential transform of A216401.
a(n) ~ 2 * n^n / (sqrt(1+LambertW(1)) * LambertW(1)^n * exp(n)). - Vaclav Kotesovec, Jun 26 2022
Showing 1-8 of 8 results.