OFFSET
0,4
COMMENTS
a(n) is the number of cyclic permutations that, when written in their one-line notation, is composed of an increasing segment, followed by another increasing segment, followed by a decreasing segment.
FORMULA
PROG
(PARI) t051168(n, k) = if (n==0, 1, (1/n) * sumdiv(gcd(n, k), d, moebius(d) * binomial(n/d, k/d)));
T303979(n, k) = my(t=sum(j=1, k-1, (-1)^(k+j+1)*t051168(n, j))); if (!(n % 2), t += (-1)^(k+1)*sum(j=1, k-1, if (((n-j) % 4) == 2, t051168(n/2, j/2)))); t;
a027376(n) = if(n<1, n==0, sumdiv(n, d, moebius(n/d)*3^d)/n);
a006575(n) = sumdiv( n, d, if ( bitand(d, 1), moebius(d) * (3^(n/d)-1) , 0 ) ) / (2*n);
a(n) = if (n <= 2, 1, res = a027376(n)/2 - sum(i=2, n-1, i*T303979(n, i)); if (!(n%2), res += a006575(n/2)/2); res); \\ Michel Marcus, May 16 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Kassie Archer, May 03 2018
EXTENSIONS
More terms from Michel Marcus, May 16 2018
STATUS
approved