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-5 of 5 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 *)

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 *)

A272603 Number of permutations of [n] whose cycle lengths are factorials.

Original entry on oeis.org

1, 1, 2, 4, 10, 26, 196, 1072, 7484, 42940, 261496, 1477136, 15219832, 134828344, 1488515120, 13692017536, 130252442896, 1123580329232, 14639510308384, 173489066401600, 2528654220104096, 31472160333513376, 402634734214583872, 4645625988351336704, 25925035549644280991680
Offset: 0

Views

Author

Joerg Arndt, May 29 2016

Keywords

Crossrefs

Cf. A000142, A273001 (cycle lengths are Fibonacci numbers), A272602 (e.g.f.: exp( sum(n>=1, x^(n!) / n ) ) ), A273996, A317132.

Programs

  • Maple
    a:= proc(n) option remember; local r, f, i;
          if n=0 then 1 else r, f, i:= $0..2;
            while f<=n do r:= r +a(n-f)*(f-1)!*
              binomial(n-1, f-1); f, i:= f*i, i+1
            od; r
          fi
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Jun 04 2016
  • Mathematica
    nmax = 4; egf = Exp[Sum[x^n!/n!, {n, 1, nmax}]] + O[x]^(nmax! + 1); CoefficientList[egf, x]*Range[0, nmax!]! (* Jean-François Alcover, Feb 19 2017 *)
  • PARI
    N=66; x='x+O('x^N); Vec(serlaplace(exp(sum(n=1,10,x^(n!)/n!))))

Formula

E.g.f.: exp( sum(n>=1, x^(n!) / n! ) ).

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 *)
Showing 1-5 of 5 results.