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-10 of 15 results. Next

A000312 a(n) = n^n; number of labeled mappings from n points to themselves (endofunctions).

Original entry on oeis.org

1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 10000000000, 285311670611, 8916100448256, 302875106592253, 11112006825558016, 437893890380859375, 18446744073709551616, 827240261886336764177, 39346408075296537575424, 1978419655660313589123979
Offset: 0

Views

Author

Keywords

Comments

Also number of labeled pointed rooted trees (or vertebrates) on n nodes.
For n >= 1 a(n) is also the number of n X n (0,1) matrices in which each row contains exactly one entry equal to 1. - Avi Peretz (njk(AT)netvision.net.il), Apr 21 2001
Also the number of labeled rooted trees on (n+1) nodes such that the root is lower than its children. Also the number of alternating labeled rooted ordered trees on (n+1) nodes such that the root is lower than its children. - Cedric Chauve (chauve(AT)lacim.uqam.ca), Mar 27 2002
With p(n) = the number of integer partitions of n, p(i) = the number of parts of the i-th partition of n, d(i) = the number of different parts of the i-th partition of n, p(j, i) = the j-th part of the i-th partition of n, m(i, j) = multiplicity of the j-th part of the i-th partition of n, one has: a(n) = Sum_{i=1..p(n)} (n!/(Product_{j=1..p(i)} p(i, j)!)) * ((n!/(n - p(i)))!/(Product_{j=1..d(i)} m(i, j)!)). - Thomas Wieder, May 18 2005
All rational solutions to the equation x^y = y^x, with x < y, are given by x = A000169(n+1)/A000312(n), y = A000312(n+1)/A007778(n), where n = 1, 2, 3, ... . - Nick Hobson, Nov 30 2006
a(n) is the total number of leaves in all (n+1)^(n-1) trees on {0,1,2,...,n} rooted at 0. For example, with edges directed away from the root, the trees on {0,1,2} are {0->1,0->2},{0->1->2},{0->2->1} and contain a total of a(2)=4 leaves. - David Callan, Feb 01 2007
Limit_{n->infinity} A000169(n+1)/a(n) = exp(1). Convergence is slow, e.g., it takes n > 74 to get one decimal place correct and n > 163 to get two of them. - Alonso del Arte, Jun 20 2011
Also smallest k such that binomial(k, n) is divisible by n^(n-1), n > 0. - Michel Lagneau, Jul 29 2013
For n >= 2 a(n) is represented in base n as "one followed by n zeros". - R. J. Cano, Aug 22 2014
Number of length-n words over the alphabet of n letters. - Joerg Arndt, May 15 2015
Number of prime parking functions of length n+1. - Rui Duarte, Jul 27 2015
The probability density functions p(x, m=q, n=q, mu=1) = A000312(q)*E(x, q, q) and p(x, m=q, n=1, mu=q) = (A000312(q)/A000142(q-1))*x^(q-1)*E(x, q, 1), with q >= 1, lead to this sequence, see A163931, A274181 and A008276. - Johannes W. Meijer, Jun 17 2016
Satisfies Benford's law [Miller, 2015]. - N. J. A. Sloane, Feb 12 2017
A signed version of this sequence apart from the first term (1, -4, -27, 256, 3125, -46656, ...), has the following property: for every prime p == 1 (mod 2n), (-1)^(n(n-1)/2)*n^n = A057077(n)*a(n) is always a 2n-th power residue modulo p. - Jianing Song, Sep 05 2018
From Juhani Heino, May 07 2019: (Start)
n^n is both Sum_{i=0..n} binomial(n,i)*(n-1)^(n-i)
and Sum_{i=0..n} binomial(n,i)*(n-1)^(n-i)*i.
The former is the familiar binomial distribution of a throw of n n-sided dice, according to how many times a required side appears, 0 to n. The latter is the same but each term is multiplied by its amount. This means that if the bank pays the player 1 token for each die that has the chosen side, it is always a fair game if the player pays 1 token to enter - neither bank nor player wins on average.
Examples:
2-sided dice (2 coins): 4 = 1 + 2 + 1 = 1*0 + 2*1 + 1*2 (0 omitted from now on);
3-sided dice (3 long triangular prisms): 27 = 8 + 12 + 6 + 1 = 12*1 + 6*2 + 1*3;
4-sided dice (4 long square prisms or 4 tetrahedrons): 256 = 81 + 108 + 54 + 12 + 1 = 108*1 + 54*2 + 12*3 + 1*4;
5-sided dice (5 long pentagonal prisms): 3125 = 1024 + 1280 + 640 + 160 + 20 + 1 = 1280*1 + 640*2 + 160*3 + 20*4 + 1*5;
6-sided dice (6 cubes): 46656 = 15625 + 18750 + 9375 + 2500 + 375 + 30 + 1 = 18750*1 + 9375*2 + 2500*3 + 375*4 + 30*5 + 1*6.
(End)
For each n >= 1 there is a graph on a(n) vertices whose largest independent set has size n and whose independent set sequence is constant (specifically, for each k=1,2,...,n, the graph has n^n independent sets of size k). There is no graph of smaller order with this property (Ball et al. 2019). - David Galvin, Jun 13 2019
For n >= 2 and 1 <= k <= n, a(n)*(n + 1)/4 + a(n)*(k - 1)*(n + 1 - k)/2*n is equal to the sum over all words w = w(1)...w(n) of length n over the alphabet {1, 2, ..., n} of the following quantity: Sum_{i=1..w(k)} w(i). Inspired by Problem 12432 in the AMM (see links). - Sela Fried, Dec 10 2023
Also, dimension of the unique cohomology group of the smallest interval containing the poset of partitions decorated by Perm, i.e. the poset of pointed partitions. - Bérénice Delcroix-Oger, Jun 25 2025

Examples

			G.f. = 1 + x + 4*x^2 + 27*x^3 + 256*x^4 + 3125*x^5 + 46656*x^6 + 823543*x^7 + ...
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, pp. 62, 63, 87.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 173, #39.
  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.2.37)
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First column of triangle A055858. Row sums of A066324.
Cf. A001923 (partial sums), A002109 (partial products), A007781 (first differences), A066588 (sum of digits).
Cf. A056665, A081721, A130293, A168658, A275549-A275558 (various classes of endofunctions).

Programs

  • Haskell
    a000312 n = n ^ n
    a000312_list = zipWith (^) [0..] [0..]  -- Reinhard Zumkeller, Jul 07 2012
    
  • Maple
    A000312 := n->n^n: seq(A000312(n), n=0..17);
  • Mathematica
    Array[ #^# &, 16] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    Table[Sum[StirlingS2[n, i] i! Binomial[n, i], {i, 0, n}], {n, 0, 20}] (* Geoffrey Critzer, Mar 17 2009 *)
    a[ n_] := If[ n < 1, Boole[n == 0], n^n]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ 1 / (1 + LambertW[-x]), {x, 0, n}]]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[n < 0, 0, n! SeriesCoefficient[ Nest[ 1 / (1 - x / (1 - Integrate[#, x])) &, 1 + O[x], n], {x, 0, n}]]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[ n < 0, 0, With[{m = n + 1}, m! SeriesCoefficient[ InverseSeries[ Series[ (x - 1) Log[1 - x], {x, 0, m}]], m]]]; (* Michael Somos, May 24 2014 *)
  • Maxima
    A000312[n]:=if n=0 then 1 else n^n$
    makelist(A000312[n],n,0,30); /* Martin Ettl, Oct 29 2012 */
    
  • PARI
    {a(n) = n^n};
    
  • PARI
    is(n)=my(b,k=ispower(n,,&b));if(k,for(e=1,valuation(k,b), if(k/b^e == e, return(1)))); n==1 \\ Charles R Greathouse IV, Jan 14 2013
    
  • PARI
    {a(n) = my(A = 1 + O(x)); if( n<0, 0, for(k=1, n, A = 1 / (1 - x / (1 - intformal( A)))); n! * polcoeff( A, n))}; /* Michael Somos, May 24 2014 */
    
  • Python
    def A000312(n): return n**n # Chai Wah Wu, Nov 07 2022

Formula

a(n-1) = -Sum_{i=1..n} (-1)^i*i*n^(n-1-i)*binomial(n, i). - Yong Kong (ykong(AT)curagen.com), Dec 28 2000
E.g.f.: 1/(1 + W(-x)), W(x) = principal branch of Lambert's function.
a(n) = Sum_{k>=0} binomial(n, k)*Stirling2(n, k)*k! = Sum_{k>=0} A008279(n,k)*A048993(n,k) = Sum_{k>=0} A019538(n,k)*A007318(n,k). - Philippe Deléham, Dec 14 2003
E.g.f.: 1/(1 - T), where T = T(x) is Euler's tree function (see A000169).
a(n) = A000169(n+1)*A128433(n+1,1)/A128434(n+1,1). - Reinhard Zumkeller, Mar 03 2007
Comment on power series with denominators a(n): Let f(x) = 1 + Sum_{n>=1} x^n/n^n. Then as x -> infinity, f(x) ~ exp(x/e)*sqrt(2*Pi*x/e). - Philippe Flajolet, Sep 11 2008
E.g.f.: 1 - exp(W(-x)) with an offset of 1 where W(x) = principal branch of Lambert's function. - Vladimir Kruchinin, Sep 15 2010
a(n) = (n-1)*a(n-1) + Sum_{i=1..n} binomial(n, i)*a(i-1)*a(n-i). - Vladimir Shevelev, Sep 30 2010
With an offset of 1, the e.g.f. is the compositional inverse ((x - 1)*log(1 - x))^(-1) = x + x^2/2! + 4*x^3/3! + 27*x^4/4! + .... - Peter Bala, Dec 09 2011
a(n) = denominator((1 + 1/n)^n) for n > 0. - Jean-François Alcover, Jan 14 2013
a(n) = A089072(n,n) for n > 0. - Reinhard Zumkeller, Mar 18 2013
a(n) = (n-1)^(n-1)*(2*n) + Sum_{i=1..n-2} binomial(n, i)*(i^i*(n-i-1)^(n-i-1)), n > 1, a(0) = 1, a(1) = 1. - Vladimir Kruchinin, Nov 28 2014
log(a(n)) = lim_{k->infinity} k*(n^(1+1/k) - n). - Richard R. Forberg, Feb 04 2015
From Ilya Gutkovskiy, Jun 18 2016: (Start)
Sum_{n>=1} 1/a(n) = 1.291285997... = A073009.
Sum_{n>=1} 1/a(n)^2 = 1.063887103... = A086648.
Sum_{n>=1} n!/a(n) = 1.879853862... = A094082. (End)
A000169(n+1)/a(n) -> e, as n -> oo. - Daniel Suteu, Jul 23 2016
a(n) = n!*Product_{k=1..n} binomial(n, k)/Product_{k=1..n-1} binomial(n-1, k) = n!*A001142(n)/A001142(n-1). - Tony Foster III, Sep 05 2018
a(n-1) = abs(p_n(2-n)), for n > 2, the single local extremum of the n-th row polynomial of A055137 with Bagula's sign convention. - Tom Copeland, Nov 15 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = A083648. - Amiram Eldar, Jun 25 2021
Limit_{n->oo} (a(n+1)/a(n) - a(n)/a(n-1)) = e (see Brothers/Knox link). - Harlan J. Brothers, Oct 24 2021
Conjecture: a(n) = Sum_{i=0..n} A048994(n, i) * A048993(n+i, n) for n >= 0; proved by Mike Earnest, see link at A354797. - Werner Schulte, Jun 19 2022

A056665 Number of equivalence classes of n-valued Post functions of 1 variable under action of complementing group C(1,n).

Original entry on oeis.org

1, 3, 11, 70, 629, 7826, 117655, 2097684, 43046889, 1000010044, 25937424611, 743008623292, 23298085122493, 793714780783770, 29192926025492783, 1152921504875290696, 48661191875666868497, 2185911559749720272442, 104127350297911241532859
Offset: 1

Views

Author

Vladeta Jovovic, Aug 09 2000

Keywords

Comments

Diagonal of arrays defined in A054630 and A054631.
Given n colors, a(n) = number of necklaces with n beads and 1 up to n colors effectively assigned to them (super_labeled: which also generates n different monochrome necklaces). - Wouter Meeussen, Aug 09 2002
Number of endofunctions on a set with n objects up to cyclic permutation (rotation). E.g., for n = 3, the 11 endofunctions are 1,1,1; 2,2,2; 3,3,3; 1,1,2; 1,2,2; 1,1,3; 1,3,3; 2,2,3; 2,3,3; 1,2,3; and 1,3,2. - Franklin T. Adams-Watters, Jan 17 2007
Also number of pre-necklaces in Sigma(n,n) (see Ruskey and others). - Peter Luschny, Aug 12 2012
From Olivier Gérard, Aug 01 2016: (Start)
Decomposition of the endofunctions by class size.
.
n | 1 2 3 4 5 6 7
--+----------------------------------
1 | 1
2 | 2 1
3 | 3 0 8
4 | 4 6 0 60
5 | 5 0 0 0 624
6 | 6 15 70 0 0 7735
7 | 7 0 0 0 0 0 117648
.
The right diagonal gives the number of Lyndon Words or aperiodic necklaces, A075147. By multiplying each column by the corresponding size and summing, one gets A000312.
(End)

Examples

			The 11 necklaces for n=3 are (grouped by partition of 3): (RRR,GGG,BBB),(RRG,RGG, RRB,RBB, GGB,GBB), (RGB,RBG).
		

References

  • D. E. Knuth. Generating All Tuples and Permutations. The Art of Computer Programming, Vol. 4, Fascicle 2, 7.2.1.1. Addison-Wesley, 2005.

Crossrefs

Diagonal of arrays defined in A054630, A054631 and A075195.
Cf. A075147 Aperiodic necklaces, a subset of this sequence.
Cf. A000169 Classes under translation mod n
Cf. A168658 Classes under complement to n+1
Cf. A130293 Classes under translation and rotation
Cf. A081721 Classes under rotation and reversal
Cf. A275549 Classes under reversal
Cf. A275550 Classes under reversal and complement
Cf. A275551 Classes under translation and reversal
Cf. A275552 Classes under translation and complement
Cf. A275553 Classes under translation, complement and reversal
Cf. A275554 Classes under translation, rotation and complement
Cf. A275555 Classes under translation, rotation and reversal
Cf. A275556 Classes under translation, rotation, complement and reversal
Cf. A275557 Classes under rotation and complement
Cf. A275558 Classes under rotation, complement and reversal
Cf. A228640.

Programs

  • Maple
    with(numtheory):
    a:= n-> add(phi(d)*n^(n/d), d=divisors(n))/n:
    seq(a(n), n=1..25);  # Alois P. Heinz, Jun 18 2013
  • Mathematica
    Table[Fold[ #1+EulerPhi[ #2] n^(n/#2)&, 0, Divisors[n]]/n, {n, 7}]
  • PARI
    a(n) = sum(k=1,n,n^gcd(k,n)) / n; \\ Joerg Arndt, Mar 19 2017
  • Sage
    # This algorithm counts all n-ary n-tuples (a_1,..,a_n) such that the string a_1...a_n is preprime. It is algorithm F in Knuth 7.2.1.1.
    def A056665_list(n):
        C = []
        for m in (1..n):
            a = [0]*(n+1); a[0]=-1;
            j = 1; count = 0
            while(true):
                if m%j == 0 : count += 1;
                j = n
                while a[j] >= m-1 : j -= 1
                if j == 0 : break
                a[j] += 1
                for k in (j+1..n): a[k] = a[k-j]
            C.append(count)
        return C
    
  • Sage
    def A056665(n): return sum(euler_phi(d)*n^(n//d)//n for d in divisors(n))
    [A056665(n) for n in (1..18)] # Peter Luschny, Aug 12 2012
    

Formula

a(n) = Sum_{d|n} phi(d)*n^(n/d)/n.
a(n) ~ n^(n-1). - Vaclav Kotesovec, Sep 11 2014
a(n) = (1/n) * Sum_{k=1..n} n^gcd(k,n). - Joerg Arndt, Mar 19 2017
a(n) = [x^n] -Sum_{k>=1} phi(k)*log(1 - n*x^k)/k. - Ilya Gutkovskiy, Mar 21 2018
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = (1/n)*Sum_{k=1..n} n^(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)).
a(n) = (1/n)*A228640(n). (End)

A081721 Number of bracelets of n beads in up to n colors.

Original entry on oeis.org

1, 3, 10, 55, 377, 4291, 60028, 1058058, 21552969, 500280022, 12969598086, 371514016094, 11649073935505, 396857785692525, 14596464294191704, 576460770691256356, 24330595997127372497, 1092955780817066765469, 52063675152021153895330, 2621440000054016000176044
Offset: 1

Views

Author

N. J. A. Sloane, based on information supplied by Gary W. Adamson, Apr 05 2003

Keywords

Comments

T(n,n), T given in A081720.
From Olivier Gérard, Aug 01 2016: (Start)
Number of classes of functions of [n] to [n] under rotation and reversal.
.
Classes can be of size between 1 and 2n
depending on divisibility properties of n.
.
n 1 2 3 4 5 n 2n
----------------------------------------
1 1
2 2 1
3 3 0 6 1
4 4 6 0 30 15
5 5 0 0 120 252
6 6 15 30 725 3515
7 7 0 0 2394 57627
.
(End)

Crossrefs

Cf. A000312 All endofunctions
Cf. A000169 Classes under translation mod n
Cf. A001700 Classes under sort
Cf. A056665 Classes under rotation
Cf. A168658 Classes under complement to n+1
Cf. A130293 Classes under translation and rotation
Cf. A275549 Classes under reversal
Cf. A275550 Classes under reversal and complement
Cf. A275551 Classes under translation and reversal
Cf. A275552 Classes under translation and complement
Cf. A275553 Classes under translation, complement and reversal
Cf. A275554 Classes under translation, rotation and complement
Cf. A275555 Classes under translation, rotation and reversal
Cf. A275556 Classes under translation, rotation, complement and reversal
Cf. A275557 Classes under rotation and complement
Cf. A275558 Classes under rotation, complement and reversal
Row sums of partition array A213941.
Main diagonal of A321791.

Programs

  • Mathematica
    Table[CycleIndex[DihedralGroup[n],s]/.Table[s[i]->n,{i,1,n}],{n,1,20}] (* Geoffrey Critzer, Jun 18 2013 *)
    t[n_, k_] := (For[t1 = 0; d = 1, d <= n, d++, If[Mod[n, d] == 0, t1 = t1 + EulerPhi[d]*k^(n/d)]]; If[EvenQ[n], (t1 + (n/2)*(1 + k)*k^(n/2))/(2*n), (t1 + n*k^((n + 1)/2))/(2*n)]); a[n_] := t[n, n]; Array[a, 20] (* Jean-François Alcover, Nov 02 2017, after Maple code for A081720 *)

Formula

a(n) ~ n^(n-1) / 2. - Vaclav Kotesovec, Mar 18 2017

Extensions

Name changed by Olivier Gérard, Aug 05 2016
Name revised by Álvar Ibeas, Apr 20 2018

A275549 Number of classes of endofunctions of [n] under reversal.

Original entry on oeis.org

1, 1, 3, 18, 136, 1625, 23436, 412972, 8390656, 193739769, 5000050000, 142656721086, 4458051717120, 151437584670385, 5556003465485760, 218946946471875000, 9223372039002259456, 413620131002462320337, 19673204037747448432896, 989209827833222327690890
Offset: 0

Views

Author

Olivier Gérard, Aug 01 2016

Keywords

Comments

f and g are in the same class if function g(i) = f(n+1-i) for all i.
Decomposition by class size
.
n 1 2
---------------
1 1 0
2 2 1
3 9 9
4 16 120
5 125 1500
6 216 23220
7 2401 410571
.
Demonstration for the formula: the classes are either of size 1 or 2.
The classes of size 1 is for functions invariant by reversal. They are specified by half their values, including one more if n is odd. Their number is n^(ceiling(n/2)).
So the number of classes under this symmetry is half (the number of functions + the number of classes of size 1).
a(n) is the number of unoriented length n strings with a maximum of n colors. - Andrew Howroyd, Sep 13 2019

Crossrefs

Main diagonal of A277504.
Cf. A000312 All endofunctions
Cf. A000169 Classes under translation mod n
Cf. A001700 Classes under sort
Cf. A056665 Classes under rotation
Cf. A168658 Classes under complement to n+1
Cf. A130293 Classes under translation and rotation
Cf. A081721 Classes under rotation and reversal
Cf. A275550 Classes under reversal and complement
Cf. A275551 Classes under translation and reversal
Cf. A275552 Classes under translation and complement
Cf. A275553 Classes under translation, complement and reversal
Cf. A275554 Classes under translation, rotation and complement
Cf. A275555 Classes under translation, rotation and reversal
Cf. A275556 Classes under translation, rotation, complement and reversal
Cf. A275557 Classes under rotation and complement
Cf. A275558 Classes under rotation, complement and reversal
Cf. A078707 Endofunctions symmetric around their middle (stable by reversal).

Programs

Formula

a(n) = (n^n+n^ceiling(n/2))/2.

A130293 Number of necklaces of n beads with up to n colors, with cyclic permutation {1,..,n} of the colors taken to be equivalent.

Original entry on oeis.org

1, 2, 5, 20, 129, 1316, 16813, 262284, 4783029, 100002024, 2357947701, 61917406672, 1792160394049, 56693913450992, 1946195068379933, 72057594071484456, 2862423051509815809, 121439531097819321972, 5480386857784802185957, 262144000000051200072048, 13248496640331026150086281
Offset: 1

Views

Author

Wouter Meeussen, Aug 06 2007, Aug 14 2007

Keywords

Comments

From Olivier Gérard, Aug 01 2016: (Start)
Equivalent to the definition: number of classes of endofunctions of [n] under rotation and translation mod n.
Classes can be of size between n and n^2 depending on divisibility properties of n.
n n 2n 3n ... n^2
--------------------------
1 1
2 2
3 3 2
4 4 2 14
5 5 0 124
6 6 6 22 1282
7 7 0 16806
For prime n, the only possible class sizes are n and n^2, the classes of size n are the n arithmetical progression modulo n so #(c-n)=n, #(c-n^2)=(n^n - n*n)/n^2 = n^(n-2)-1 and a(n) = n^(n-2)+n-1.
(End)

Examples

			The 5 necklaces for n=3 are: 000, 001, 002, 012 and 021.
		

Crossrefs

Cf. A081720.
Cf. A000312: All endofunctions.
Cf. A000169: Classes under translation mod n.
Cf. A001700: Classes under sort.
Cf. A056665: Classes under rotation.
Cf. A168658: Classes under complement to n+1.
Cf. A130293: Classes under translation and rotation.
Cf. A081721: Classes under rotation and reversal.
Cf. A275549: Classes under reversal.
Cf. A275550: Classes under reversal and complement.
Cf. A275551: Classes under translation and reversal.
Cf. A275552: Classes under translation and complement.
Cf. A275553: Classes under translation, complement and reversal.
Cf. A275554: Classes under translation, rotation and complement.
Cf. A275555: Classes under translation, rotation and reversal.
Cf. A275556: Classes under translation, rotation, complement and reversal.
Cf. A275557: Classes under rotation and complement.
Cf. A275558: Classes under rotation, complement and reversal.

Programs

  • Mathematica
    tor8={};ru8=Thread[ i_ ->Table[ Mod[i+k,8],{k,8}]];Do[idi=IntegerDigits[k,8,8];try= Function[w, First[temp=Union[Join @@(Table[RotateRight[w,k],{k,8}]/.#&)/@ ru8]]][idi];If[idi===try, tor8=Flatten[ {tor8,{{Length[temp],idi}}},1] ],{k,0,8^8-1}];
    a[n_]:=Sum[d EulerPhi[d]n^(n/d),{d,Divisors[n]}]/n^2; Array[a,21] (* Stefano Spezia, May 21 2024 *)
  • PARI
    a(n) = sumdiv(n, d, d*eulerphi(d)*n^(n/d))/n^2; \\ Michel Marcus, Aug 05 2016

Formula

a(n) = (1/n^2)*Sum_{d|n} d*phi(d)*n^(n/d). - Vladeta Jovovic, Aug 14 2007, Aug 24 2007

A275558 Number of classes of endofunctions of [n] under rotation, complement to n+1 and reversal.

Original entry on oeis.org

1, 1, 2, 6, 31, 195, 2182, 30100, 529674, 10778125, 250155012, 6484839306, 185757443582, 5824538174455, 198428907905336, 7298232189810696, 288230385949610020, 12165298000307625609, 546477890436083284338, 26031837576091248872110, 1310720000028416000168044
Offset: 0

Views

Author

Olivier Gérard, Aug 05 2016

Keywords

Comments

Classes can be of size 1,2,4, n, 2n or 4n.
.
n 1 2 4 n 2n 4n
---------------------------------
1 1
2 0 2
3 1 1 4
4 0 4 4 0 17 6
5 1 2 0 0 72 120
6 0 6 6 30 410 1730
7 1 3 0 0 1368 28728
.
For n odd, the constant function (n+1)/2 is the only stable by rotation, complement and reversal. So #c1=1.
For n even, there is no stable function, so #c1=0, but constant functions are grouped two by two making n/2 classes of size 2. Functions alternating a value and its complement are also grouped two by two, making another n/2 classes. This gives #c2=n.

Crossrefs

Cf. A000312 All endofunctions
Cf. A000169 Classes under translation mod n
Cf. A001700 Classes under sort
Cf. A056665 Classes under rotation
Cf. A168658 Classes under complement to n+1
Cf. A130293 Classes under translation and rotation
Cf. A081721 Classes under rotation and reversal
Cf. A275549 Classes under reversal
Cf. A275550 Classes under reversal and complement
Cf. A275551 Classes under translation and reversal
Cf. A275552 Classes under translation and complement
Cf. A275553 Classes under translation, complement and reversal
Cf. A275554 Classes under translation, rotation and complement
Cf. A275555 Classes under translation, rotation and reversal
Cf. A275556 Classes under translation, rotation, complement and reversal
Cf. A275557 Classes under rotation and complement

Programs

  • PARI
    \\ see A056391 for Polya enumeration functions
    a(n) = NonequivalentSorts(DihedralPerms(n), ReversiblePerms(n)); \\ Andrew Howroyd, Sep 30 2017

Extensions

Terms a(8) and beyond from Andrew Howroyd, Sep 30 2017

A275550 Number of classes of endofunctions of [n] under reversal and complement to n+1.

Original entry on oeis.org

1, 1, 2, 10, 72, 819, 11772, 206572, 4196352, 96871525, 2500050000, 71328400806, 2229026605056, 75718793541895, 2778001759096256, 109473473278652344, 4611686020574871552, 206810065502975099529
Offset: 0

Views

Author

Olivier Gérard, Aug 01 2016

Keywords

Comments

Possible classes size are 1,2,4
n 1 2 4
-----------------
1 1 0 0
2 0 2 0
3 1 5 4
4 0 16 56
5 1 74 744
6 0 216 11556
7 1 1371 205200.
Classes of size 2 can be further decomposed by whether the function is stable by reversal or stable by (reversal and complement).
n 2 2-r 2-rc
-----------------
1 0 0 0
2 2 1 1
3 5 4 1
4 16 8 8
5 74 62 12
6 216 108 108
7 1371 1200 171.

Crossrefs

Cf. A000312 All endofunctions
Cf. A000169 Classes under translation mod n
Cf. A001700 Classes under sort
Cf. A056665 Classes under rotation
Cf. A168658 Classes under complement to n+1
Cf. A130293 Classes under translation and rotation
Cf. A081721 Classes under rotation and reversal
Cf. A275549 Classes under reversal
Cf. A275550 Classes under reversal and complement
Cf. A275551 Classes under translation and reversal
Cf. A275552 Classes under translation and complement
Cf. A275553 Classes under translation, complement and reversal
Cf. A275554 Classes under translation, rotation and complement
Cf. A275555 Classes under translation, rotation and reversal
Cf. A275556 Classes under translation, rotation, complement and reversal
Cf. A275557 Classes under rotation and complement
Cf. A275558 Classes under rotation, complement and reversal
Cf. A192396 floor(((k+1)^n-(1+(-1)^k)/2)/2)
Cf. A275574 (2-r classes)

Programs

  • Mathematica
    Table[1/8 (1+(-1)^(1+n)+2 n^n+n^Floor[n/2] (3+(-1)^(n+1) (-1+n)+n)),{n,1,17}]
  • PARI
    a(n) = (1+(-1)^(n+1)+2*n^n+(3+((-1)^(n+1))*(n-1)+n)*n^(floor(n/2)) )/8; \\ Andrew Howroyd, Sep 30 2017

Formula

a(n) = (1+(-1)^(n+1)+2*n^n+(3+((-1)^(n+1))*(n-1)+n)*n^(floor(n/2)) )/8.
Classes of size 2: (2 (-1 + (-1)^n) + n^floor(n/2)*(3 + ((-1)^(1 + n))* (-1 + n) + n))/4.

Extensions

Duplicate a(7) removed by Andrew Howroyd, Sep 30 2017

A275551 Number of classes of endofunctions of [n] under vertical translation mod n and reversal.

Original entry on oeis.org

1, 1, 2, 6, 36, 325, 3924, 58996, 1049088, 21526641, 500010000, 12968792826, 371504434176, 11649044974645, 396857394156608, 14596463098125000, 576460752571858944, 24330595941321312961, 1092955779880368226560, 52063675149116964615310, 2621440000000512000000000
Offset: 0

Views

Author

Olivier Gérard, Aug 02 2016

Keywords

Comments

There are two size of classes, n or 2n.
n c:n c:2n (c:n)/n (c:2n)/n
0 1
1 1
2 2
3 3 3 1 1
4 8 28 2 7
5 25 300 5 60
6 72 3852 12 642
7 343 58653 49 8379

Examples

			a(2) = 2: 11, 12.
a(3) = 6: 111, 112, 113, 121, 123, 131.
a(4) = 36: 1111, 1112, 1113, 1114, 1121, 1122, 1123, 1124, 1131, 1132, 1133, 1134, 1141, 1142, 1143, 1212, 1213, 1214, 1221, 1223, 1224, 1231, 1234, 1241, 1242, 1243, 1312, 1313, 1323, 1324, 1331, 1334, 1341, 1412, 1423, 1441.
		

Crossrefs

Cf. A000312 All endofunctions
Cf. A000169 Classes under translation mod n
Cf. A001700 Classes under sort
Cf. A056665 Classes under rotation
Cf. A168658 Classes under complement to n+1
Cf. A130293 Classes under translation and rotation
Cf. A081721 Classes under rotation and reversal
Cf. A275549 Classes under reversal
Cf. A275550 Classes under reversal and complement
Cf. A275552 Classes under translation and complement
Cf. A275553 Classes under translation, complement and reversal
Cf. A275554 Classes under translation, rotation and complement
Cf. A275555 Classes under translation, rotation and reversal
Cf. A275556 Classes under translation, rotation, complement and reversal
Cf. A275557 Classes under rotation and complement
Cf. A275558 Classes under rotation, complement and reversal

Programs

  • PARI
    \\ see A056391 for Polya enumeration functions
    a(n) = NonequivalentSorts(ReversiblePerms(n), CyclicPerms(n)); \\ Andrew Howroyd, Sep 30 2017

Extensions

Terms a(8) and beyond from Andrew Howroyd, Sep 30 2017

A275552 Number of classes of endofunctions of [n] under vertical translation mod n and complement to n+1.

Original entry on oeis.org

1, 1, 2, 5, 36, 313, 3904, 58825, 1048640, 21523361, 500000256, 12968712301, 371504186368, 11649042561241, 396857386631168, 14596463012695313, 576460752303439872, 24330595937833434241, 1092955779869348331520, 52063675148955620766421, 2621440000000000000262144
Offset: 0

Views

Author

Olivier Gérard, Aug 02 2016

Keywords

Comments

There are two size of classes, n or 2n.
.
n c:n c:2n (c:2n)/4
0 1
1 1
2 2
3 1 4 1
4 8 28 7
5 1 312 78
6 32 3872 968
7 1 58824 14706
For n odd, only the set of n constant functions can have a member of their class equal to their complement, so c:n size is 1.
For n even, the c:n class is populated by binary words using k for 0 and n+1-k for 1. There are (2^n)/2 such words as the complement operation identifies them by pairs.
For n odd, c:2n(n) = (n^n - 1*n)/(2*n)
For n even, c:2n(n) = (n^n - 2^(n-1)*n)/(2*n)

Crossrefs

Cf. A000312 All endofunctions;
Cf. A000169 Classes under translation mod n;
Cf. A001700 Classes under sort;
Cf. A056665 Classes under rotation;
Cf. A168658 Classes under complement to n+1;
Cf. A130293 Classes under translation and rotation;
Cf. A081721 Classes under rotation and reversal;
Cf. A275549 Classes under reversal;
Cf. A275550 Classes under reversal and complement;
Cf. A275551 Classes under translation and reversal;
Cf. A275553 Classes under translation, complement and reversal;
Cf. A275554 Classes under translation, rotation and complement;
Cf. A275555 Classes under translation, rotation and reversal;
Cf. A275556 Classes under translation, rotation, complement and reversal;
Cf. A275557 Classes under rotation and complement;
Cf. A275558 Classes under rotation, complement and reversal.

Programs

  • Mathematica
    a[0] = 1; a[n_?OddQ] := 1 + (n^n - n)/(2n); a[n_?EvenQ] := 2^(n-1) + (n^n - 2^(n-1)*n)/(2n); Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Oct 07 2017, translated from PARI *)
  • PARI
    a(n) = if(n%2, 1 + (n^n - 1*n)/(2*n), 2^(n-1) + (n^n - 2^(n-1)*n)/(2*n)); \\ Andrew Howroyd, Sep 30 2017

Formula

a(n) = 1 + (n^n - 1*n)/(2*n) if n is odd,
a(n) = 2^(n-1) + (n^n - 2^(n-1)*n)/(2*n) if n is even.

A275553 Number of classes of endofunctions of [n] under vertical translation mod n, complement to n+1 and reversal.

Original entry on oeis.org

1, 1, 2, 4, 24, 169, 2024, 29584, 525600, 10764961, 250030128, 6484436676, 185752964096, 5824523694025, 198428723433728, 7298231591777344, 288230377359679488, 12165297972404595841, 546477889989773968640, 26031837574639154232100, 1310720000002816000131072
Offset: 0

Views

Author

Olivier Gérard, Aug 05 2016

Keywords

Comments

There are three size of classes : n, 2n, 4n.
n c:n c:2n c:4n
----------------------------------
0 1
1 1
2 2
3 1 2 1
4 4 10 10
5 1 24 144
6 8 148 1868
7 1 342 29241
For n odd, only the set of n constant functions can have a member of their class equal to their complement, so c:n size is 1.
For n even, we have 2^(n/2) binary words which have mirror-symmetry
There are three types of classes of size of 2n (stable by reversal, stable by complement, stable by rc as in A275550).

Crossrefs

Cf. A000312 All endofunctions
Cf. A000169 Classes under translation mod n
Cf. A001700 Classes under sort
Cf. A056665 Classes under rotation
Cf. A168658 Classes under complement to n+1
Cf. A130293 Classes under translation and rotation
Cf. A081721 Classes under rotation and reversal
Cf. A275549 Classes under reversal
Cf. A275550 Classes under reversal and complement
Cf. A275551 Classes under translation and reversal
Cf. A275552 Classes under translation and complement
Cf. A275554 Classes under translation, rotation and complement
Cf. A275555 Classes under translation, rotation and reversal
Cf. A275556 Classes under translation, rotation, complement and reversal
Cf. A275557 Classes under rotation and complement
Cf. A275558 Classes under rotation, complement and reversal

Programs

  • PARI
    \\ see A056391 for Polya enumeration functions
    a(n) = NonequivalentSorts(ReversiblePerms(n), DihedralPerms(n)); \\ Andrew Howroyd, Sep 30 2017

Extensions

Terms a(8) and beyond from Andrew Howroyd, Sep 30 2017
Showing 1-10 of 15 results. Next