login
A326575
Expansion of Sum_{k>=1} k * x^k * (1 + x^(2*k)) / (1 + x^(2*k) + x^(4*k)).
1
1, 2, 3, 4, 4, 6, 8, 8, 9, 8, 10, 12, 14, 16, 12, 16, 16, 18, 20, 16, 24, 20, 22, 24, 21, 28, 27, 32, 28, 24, 32, 32, 30, 32, 32, 36, 38, 40, 42, 32, 40, 48, 44, 40, 36, 44, 46, 48, 57, 42, 48, 56, 52, 54, 40, 64, 60, 56, 58, 48, 62, 64, 72, 64, 56, 60
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{d|n, n/d==1 (mod 6)} d - Sum_{d|n, n/d==5 (mod 6)} d.
G.f.: Sum_{k>=0} x^(6*k+1) / (1 - x^(6*k+1))^2 - x^(6*k+5) / (1 - x^(6*k+5))^2. - Michael Somos, Oct 23 2019
Multiplicative with a(p^e) = p^e if p < 5, (p^(e+1)-(-1)^(e+1))/(p+1) if p == 5 (mod 6), and (p^(e+1)-1)/(p-1) if p == 1 (mod 6). - Amiram Eldar, Dec 02 2020
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{primes p == 5 (mod 6)} 1/(1+1/p^2) * Product_{primes p == 1 (mod 3)} 1/(1 - 1/p^2) = A340578 * A175646 / 2 = 0.48831400806... . - Amiram Eldar, Nov 06 2022
EXAMPLE
G.f. = x + 2*x^2 + 3*x^3 + 4*x^4 + 4*x^5 + 6*x^6 + 8*x^7 + 8*x^8 + ... - Michael Somos, Oct 23 2019
MATHEMATICA
nmax = 66; CoefficientList[Series[Sum[k x^k (1 + x^(2 k))/(1 + x^(2 k) + x^(4 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
Table[DivisorSum[n, # &, MemberQ[{1}, Mod[n/#, 6]] &] - DivisorSum[n, # &, MemberQ[{5}, Mod[n/#, 6]] &], {n, 1, 66}]
f[p_, e_] := Which[p < 5, p^e, Mod[p, 6] == 5, (p^(e + 1) - (-1)^(e + 1))/(p + 1), Mod[p, 6] == 1, (p^(e + 1) - 1)/(p - 1)]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Dec 02 2020 *)
PROG
(PARI) a(n) = { sumdiv(n, d, d*((n/d%6==1)-(n/d%6==5))) } \\ Andrew Howroyd, Sep 12 2019
(PARI) {a(n) = if( n<0, 0, sumdiv( n, d, n/d * kronecker( -12, d)))}; /* Michael Somos, Oct 23 2019 */
CROSSREFS
Cf. A003586 (fixed points), A035178, A050469, A122373, A326401.
Sequence in context: A238963 A342940 A331527 * A331848 A290728 A296116
KEYWORD
nonn,mult
AUTHOR
Ilya Gutkovskiy, Sep 12 2019
STATUS
approved