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.

A218002 E.g.f.: exp( Sum_{n>=1} x^prime(n) / prime(n) ).

Original entry on oeis.org

1, 0, 1, 2, 3, 44, 55, 1434, 3913, 39752, 392481, 5109290, 34683451, 914698212, 5777487703, 91494090674, 1504751645265, 31764834185744, 379862450767873, 12634073744624082, 132945783064464691, 2753044719709341980, 64135578414076991031, 1822831113987975441482
Offset: 0

Views

Author

Paul D. Hanna, Oct 17 2012

Keywords

Comments

Conjecture: a(n) = number of degree-n permutations of prime order.
The conjecture is false. Cf. A214003. This sequence gives the number of n-permutations whose cycle lengths are restricted to the prime numbers. - Geoffrey Critzer, Nov 08 2015

Examples

			E.g.f.: A(x) = 1 + x^2/2! + 2*x^3/3! + 3*x^4/4! + 44*x^5/5! + 55*x^6/6! + 1434*x^7/7! + ...
where
log(A(x)) = x^2/2 + x^3/3 + x^5/5 + x^7/7 + x^11/11 + x^13/13 + x^17/17 + x^19/19 + x^23/23 + x^29/29 + ... + x^prime(n)/prime(n) + ...
a(5) = 44 because there are 5!/5 = 24 permutations that are 5-cycles and there are 5!/(2*3) = 20 permutations that are the disjoint product of a 2-cycle and a 3-cycle. - _Geoffrey Critzer_, Nov 08 2015
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(`if`(isprime(j),
          a(n-j)*(j-1)!*binomial(n-1, j-1), 0), j=1..n))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, May 12 2016
  • Mathematica
    f[list_] :=Total[list]!/Apply[Times, list]/Apply[Times, Map[Length, Split[list]]!]; Table[Total[Map[f, Select[Partitions[n], Apply[And, PrimeQ[#]] &]]], {n, 0,23}] (* Geoffrey Critzer, Nov 08 2015 *)
  • PARI
    {a(n)=n!*polcoeff(exp(sum(k=1,n,x^prime(k)/prime(k))+x*O(x^n)),n)}
    for(n=0,31,print1(a(n),", "))

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

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