OFFSET
1,1
LINKS
FORMULA
CycleBG transform of (4, 0, 0, 0, ...)
CycleBG transform T(A) = invMOEBIUS(invEULER(Carlitz(A)) + A(x^2) - A) + A.
Carlitz transform T(A(x)) has g.f. 1/(1-Sum_{k>0} (-1)^(k+1)*A(x^k)).
a(n) = (1/n) * Sum_{d | n} totient(n/d) * (3*(-1)^d + 3^d) for n > 1. - Andrew Howroyd, Mar 12 2017
MATHEMATICA
a[n_] := If[n==1, 4, Sum[EulerPhi[n/d]*(3*(-1)^d+3^d), {d, Divisors[n]}]/n ];
Array[a, 35] (* Jean-François Alcover, Jul 06 2018, after Andrew Howroyd *)
PROG
(PARI) a(n) = if(n==1, 4, sumdiv(n, d, eulerphi(n/d)*(3*(-1)^d + 3^d))/n); \\ Andrew Howroyd, Oct 14 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Christian G. Bower, Apr 29 2005
STATUS
approved