OFFSET
0,3
LINKS
Stefano Spezia, Table of n, a(n) for n = 0..350
Darij Grinberg and Peter Mao, Necklaces over a group with identity product, arXiv:2405.08937 [math.CO], 2024. See p. 23.
FORMULA
a(n) = (1/n)*Sum_{d|n} phi(n/d)*(n+1)^(d-1), for n>0, with a(0)=1.
a(n) = Sum_{k=0..[n/2]} A152290(n, n*k), where A152290 is a triangle of coefficients in a q-analog of the LambertW function. - Paul D. Hanna, Jul 18 2013
a(n) = A121773(n)/(n+1). - Amiram Eldar, Aug 15 2023
MATHEMATICA
a[n_] := DivisorSum[n, EulerPhi[n/#] * (n+1)^(#-1) &] / n; a[0] = 1; Array[a, 20, 0] (* Amiram Eldar, Aug 15 2023 *)
PROG
(PARI) a(n)=if(n==0, 1, (1/n)*sumdiv(n, d, eulerphi(n/d)*(n+1)^(d-1)))
(PARI) /* a(n) = Sum_{k=0..[n/2]} A152290(n, n*k): */
{A152290(n, k)=local(e_q=1+sum(j=1, n, x^j/prod(i=1, j, (q^i-1)/(q-1))), LW_q=serreverse(x/e_q+x^2*O(x^n))/x); polcoeff(polcoeff(LW_q+x*O(x^n), n, x)*prod(i=1, n, (q^i-1)/(q-1))+q*O(q^k), k, q)}
{a(n)=sum(k=0, n\2, A152290(n, n*k))}
for(n=0, 20, print1(a(n), ", ")) \\ Paul D. Hanna, Jul 18 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Aug 20 2006
STATUS
approved