OFFSET
0,3
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)
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..100
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.
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 *)
PROG
(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
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.
KEYWORD
nonn,easy
AUTHOR
Olivier Gérard, Aug 02 2016
STATUS
approved