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-3 of 3 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),", "))

A181954 Weighted sum of all cyclic subgroups of prime order of the symmetric group S_n.

Original entry on oeis.org

0, 2, 9, 30, 110, 450, 2457, 11774, 47910, 264630, 5565065, 56021922, 866143434, 9894742130, 78233264865, 470058202350, 24530748587102, 409761902222094, 10595012400106545, 160826238368038490, 1585844131838898330, 16787211702213659322, 1362379222505265018329
Offset: 1

Views

Author

Olivier Gérard, Apr 03 2012

Keywords

Comments

Sum of the orders of all subgroups of prime order in S_n.

Examples

			The symmetric group S_3 has one subgroup of order 3 and three subgroups of order 2, and no other subgroups of prime order. So a(3) = 3 + 2 + 2 + 2 = 9.
		

Crossrefs

Cf. A181955 (the alternating case).

Programs

  • Mathematica
    a[n_] := Sum[If[PrimeQ[p], Sum[n!/(k!*(n-k*p)!*p^k), {k, 1, n/p}]*p/(p-1), 0], {p, 2, n}];
    Array[a, 24] (* Jean-François Alcover, Jul 06 2018, after Andrew Howroyd *)
  • PARI
    a(n)={sum(p=2, n, if(isprime(p), sum(k=1, n\p, n!/(k!*(n-k*p)!*p^k))*p/(p-1)))} \\ Andrew Howroyd, Jul 03 2018

Formula

a(n) = A186202(n) + A214003(n).

Extensions

More terms from Stephen A. Silver, Feb 16 2013

A359951 Number of permutations of [n] such that the GCD of the cycle lengths is a prime.

Original entry on oeis.org

0, 0, 1, 2, 3, 24, 145, 720, 4725, 22400, 602721, 3628800, 67692625, 479001600, 12924021825, 103953833984, 2116670180625, 20922789888000, 959231402754625, 6402373705728000, 257071215652932681, 3242340687872000000, 142597230222616430625, 1124000727777607680000
Offset: 0

Views

Author

Alois P. Heinz, Jan 19 2023

Keywords

Examples

			a(2) = 1: (12).
a(3) = 2: (123), (132).
a(4) = 3: (12)(34), (13)(24), (14)(23).
a(5) = 24: (12345), (12354), (12435), (12453), (12534), (12543), (13245), (13254), (13425), (13452), (13524), (13542), (14235), (14253), (14325), (14352), (14523), (14532), (15234), (15243), (15324), (15342), (15423), (15432).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, g) option remember; `if`(n=0, `if`(isprime(g), 1, 0),
          add(b(n-j, igcd(j, g))*(n-1)!/(n-j)!, j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..23);
  • Mathematica
    b[n_, g_] := b[n, g] = If[n == 0, If[PrimeQ[g], 1, 0], Sum[b[n - j, GCD[j, g]]*(n - 1)!/(n - j)!, {j, 1, n}]];
    a[n_] := b[n, 0];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Dec 13 2023, after Alois P. Heinz *)

Formula

a(n) = Sum_{prime p <= n} A346085(n,p).
a(p) = (p-1)! for prime p.
Showing 1-3 of 3 results.