cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 10 results.

A005928 G.f.: s(1)^3/s(3), where s(k) = eta(q^k) and eta(q) is Dedekind's function, cf. A010815.

Original entry on oeis.org

1, -3, 0, 6, -3, 0, 0, -6, 0, 6, 0, 0, 6, -6, 0, 0, -3, 0, 0, -6, 0, 12, 0, 0, 0, -3, 0, 6, -6, 0, 0, -6, 0, 0, 0, 0, 6, -6, 0, 12, 0, 0, 0, -6, 0, 0, 0, 0, 6, -9, 0, 0, -6, 0, 0, 0, 0, 12, 0, 0, 0, -6, 0, 12, -3, 0, 0, -6, 0, 0, 0, 0, 0, -6, 0, 6, -6, 0, 0, -6, 0, 6, 0, 0, 12, 0, 0, 0, 0, 0, 0, -12, 0, 12, 0, 0, 0, -6, 0, 0
Offset: 0

Views

Author

Keywords

Comments

Unsigned sequence is expansion of theta series of hexagonal net with respect to a node.
Cubic AGM theta functions: a(q) (see A004016), b(q) (this: A005928), c(q) (A005882).
Denoted by a_3(n) in Kassel and Reutenauer 2015. - Michael Somos, Jun 04 2015

Examples

			G.f. = 1 - 3*q + 6*q^3 - 3*q^4 - 6*q^7 + 6*q^9 + 6*q^12 - 6*q^13 - 3*q^16 + ...
		

References

  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 79, Eq. (32.34).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    A := Basis( ModularForms( Gamma1(9), 1), 100); A[1] - 3*A[2] + 6*A[4]; // Michael Somos, Jan 31 2015
  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ q]^3 / QPochhammer[ q^3], {q, 0, n}]; (* Michael Somos, May 24 2013 *)
    a[ n_] := If[ n < 1, Boole[ n==0], -3 Sum[{1, -1, -3, 1, -1, 3, 1, -1, 0}[[ Mod[ d, 9, 1]]], {d, Divisors @ n}]]; (* Michael Somos, Sep 23 2013 *)
  • PARI
    {a(n) = my(A, p, e); if( n<1, n==0, A = factor(n); -3 * prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==3, -2, if( p%6==1, e+1, !(e%2)))))}; \\ Michael Somos, May 20 2005
    
  • PARI
    {a(n) = my(A = x * O(x^n)); polcoeff( eta(x + A)^3 / eta(x^3 + A), n)}; \\ Michael Somos, May 20 2005
    
  • PARI
    {a(n) = if( n<1, n==0, sumdiv(n, d, [0, -3, 3, 9, -3, 3, -9, -3, 3] [d%9 + 1]))}; \\ Michael Somos, Dec 25 2007
    
  • PARI
    N=66; x='x+O('x^N); gf=exp(sum(n=1,N,(sigma(n)-sigma(3*n))*x^n/n));
    Vec(gf) \\ Joerg Arndt, Jul 30 2011
    
  • PARI
    lista(nn) = {q='q+O('q^nn); Vec(eta(q)^3/eta(q^3))} \\ Altug Alkan, Mar 20 2018
    

Formula

a(n) is the coefficient of q^n in b(q)=eta(q)^3/eta(q^3) = (3/2)*a(q^3)-a(q)/2 where a(q)=theta(Hexagonal). - Kok Seng Chua (chuaks(AT)ihpc.nus.edu.sg), May 07 2002
From Michael Somos, May 20 2005: (Start)
Euler transform of period 3 sequence [ -3, -3, -2, ...].
a(n) = -3 * b(n) except for a(0) = 1, where b()=A123477() is multiplicative with b(p^e) = -2 if p = 3 and e>0, b(p^e) = e+1 if p == 1 (mod 6), b(p^e) = (1 + (-1)^e)/2 if p == 2, 5 (mod 6).
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = v^3 - 2*u*w^2 + u^2*w.
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = u1^2*u6 - 2*u1*u2*u6 + 4*u2^2*u6 - 3*u2*u3^2.
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = u1*u2*u3 + u1^2*u3 - 3*u1*u6^2 + u2^2*u3. (End)
a(3*n + 2) = 0. a(3*n + 1) = -A005882(n), a(3*n) = A004016(n). - Michael Somos, Jul 15 2005
a(n) = -3 * A123477(n) unless n=0. |a(n)| = A113062(n).
Moebius transform is period 9 sequence [-3, 3, 9, -3, 3, -9, -3, 3, 0, ...]. - Michael Somos, Dec 25 2007
Expansion of b(q) = a(q^3) - c(q^3) in powers of q where a(), b(), c() are cubic AGM theta functions. - Michael Somos, Dec 25 2007
G.f. is a period 1 Fourier series which satisfies f(-1 / (3 t)) = 3^(3/2) (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A033687.
G.f.: exp( Sum_{n>=1} (sigma(n)-sigma(3*n))*x^n/n ). - Joerg Arndt, Jul 30 2011
a(n) = (-1)^(mod(n, 3) = 1) * A113062(n). - Michael Somos, Sep 05 2014
a(2*n + 1) = -3 * A123530(n). a(4*n) = a(n). a(4*n + 1) = -3 * A253243(n). a(4*n + 2) = 0. a(4*n + 3) = 6 * A246838(n). a(6*n + 1) = -3 * A097195(n). a(6*n + 3) = 6 * A033762(n). - Michael Somos, Jun 04 2015
G.f.: 1 + Sum_{k>0} -3 * x^k / (1 + x^k + x^(2*k)) + 9 * x^(3*k) / (1 + x^(3*k) + x^(6*k)). - Michael Somos, Jun 04 2015
a(0) = 1, a(n) = -(3/n)*Sum_{k=1..n} A078708(k)*a(n-k) for n > 0. - Seiichi Manyama, Apr 29 2017

Extensions

Edited by M. F. Hasler, May 07 2018

A144613 a(n) = sigma(3*n) = A000203(3*n).

Original entry on oeis.org

4, 12, 13, 28, 24, 39, 32, 60, 40, 72, 48, 91, 56, 96, 78, 124, 72, 120, 80, 168, 104, 144, 96, 195, 124, 168, 121, 224, 120, 234, 128, 252, 156, 216, 192, 280, 152, 240, 182, 360, 168, 312, 176, 336, 240, 288, 192, 403, 228, 372, 234, 392, 216, 363, 288, 480, 260, 360
Offset: 1

Views

Author

N. J. A. Sloane, Jan 15 2009

Keywords

Crossrefs

Sigma(k*n): A000203 (k=1), A062731 (k=2), this sequence (k=3), A193553 (k=4), A283118 (k=5), A224613 (k=6), A283078 (k=7), A283122 (k=8), A283123 (k=9).

Programs

  • Mathematica
    a[n_] := DivisorSigma[1, 3*n]; Array[a, 60] (* Amiram Eldar, Dec 16 2022 *)
  • PARI
    vector(66, n, sigma(3*n, 1)) \\ Joerg Arndt, Jul 30 2011

Formula

a(n) = A000203(n) + 3*A078708(n). - R. J. Mathar, May 19 2020
Sum_{k=1..n} a(k) = (11*Pi^2/36) * n^2 + O(n*log(n)). - Amiram Eldar, Dec 16 2022

Extensions

Zero removed and offset corrected by Seiichi Manyama, Feb 28 2017

A273845 Expansion of Product_{n>=1} (1 - x^(3*n))/(1 - x^n)^3 in powers of x.

Original entry on oeis.org

1, 3, 9, 21, 48, 99, 198, 375, 693, 1236, 2160, 3681, 6168, 10140, 16434, 26235, 41376, 64449, 99342, 151530, 229032, 343068, 509760, 751509, 1099998, 1598925, 2309274, 3314541, 4729920, 6711993, 9474624, 13306506, 18598437, 25874460, 35838288, 49427640, 67892592
Offset: 0

Views

Author

Seiichi Manyama, Nov 07 2016

Keywords

Examples

			G.f.: 1 + 3*x + 9*x^2 + 21*x^3 + 48*x^4 + 99*x^5 + 198*x^6 + ...
		

Crossrefs

Expansion of Product_{n>=1} (1 - x^(k*n))/(1 - x^n)^k in powers of x: A015128 (k=2), this sequence (k=3), A274327 (k=4), A277212 (k=5), A277283 (k=6), A160539 (k=7).

Programs

  • Mathematica
    nmax = 50; CoefficientList[Series[Product[(1 - x^(3*k))/(1 - x^k)^3, {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Nov 10 2016 *)
    (QPochhammer[x^3, x^3]/QPochhammer[x, x]^3 + O[x]^40)[[3]] (* Vladimir Reshetnikov, Nov 20 2016 *)
  • PARI
    first(n)=my(x='x); Vec(prod(k=1, n, (1-x^(3*k))/(1-x^k)^3, 1+O(x^(n+1)))) \\ Charles R Greathouse IV, Nov 07 2016
    
  • PARI
    lista(nn) = {q='q+O('q^nn); Vec(eta(q^3)/eta(q)^3)} \\ Altug Alkan, Mar 20 2018

Formula

G.f.: Product_{n>=1} (1 - x^(3*n))/(1 - x^n)^3.
a(n) ~ exp(4*Pi*sqrt(n)/3) / (9*sqrt(2)*n^(5/4)). - Vaclav Kotesovec, Nov 10 2016
a(0) = 1, a(n) = (3/n)*Sum_{k=1..n} A078708(k)*a(n-k) for n > 0. - Seiichi Manyama, Apr 29 2017
It appears that the g.f. A(x) = F(x)^3, where F(x) = exp( Sum_{n >= 0} x^(3*n+1)/((3*n + 1)*(1 - x^(3*n+1))) + x^(3*n+2)/((3*n + 2)*(1 - x^(3*n + 2))) ). Cf. A132972. - Peter Bala, Dec 23 2021

A285895 Sum of divisors d of n such that n/d is not congruent to 0 mod 4.

Original entry on oeis.org

1, 3, 4, 6, 6, 12, 8, 12, 13, 18, 12, 24, 14, 24, 24, 24, 18, 39, 20, 36, 32, 36, 24, 48, 31, 42, 40, 48, 30, 72, 32, 48, 48, 54, 48, 78, 38, 60, 56, 72, 42, 96, 44, 72, 78, 72, 48, 96, 57, 93, 72, 84, 54, 120, 72, 96, 80, 90, 60, 144, 62, 96, 104, 96, 84, 144, 68
Offset: 1

Views

Author

Seiichi Manyama, Apr 28 2017

Keywords

Examples

			The divisors of 8 are 1, 2, 4, and 8. 8/1 == 0 (mod 4) and 8/2 == 0 (mod 4). Hence, a(8) = 4 + 8 = 12.
		

Crossrefs

Cf. A002131 (k=2), A078708 (k=3), this sequence (k=4), A285896 (k=5).

Programs

  • Mathematica
    f[p_, e_] := If[p == 2, 3*2^(e-1), (p^(e+1)-1)/(p-1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 30 2022 *)
  • PARI
    a(n)=sumdiv(n, d, if(n/d%4, d, 0)); \\ Andrew Howroyd, Jul 20 2018

Formula

G.f.: Sum_{k>=1} k*x^k*(1 + x^k + x^(2*k))/(1 - x^(4*k)). - Ilya Gutkovskiy, Sep 12 2019
a(n) = A050460(n) + A002131(n/2) + A050464(n), where A002131(.)=0 for non-integer argument. - R. J. Mathar, May 25 2020
From Amiram Eldar, Oct 30 2022: (Start)
Multiplicative with a(2^e) = 3*2^(e-1) and a(p^e) = (p^(e+1)-1)/(p-1) if p > 2.
Sum_{k=1..n} a(k) ~ c * n^2, where c = 5*Pi^2/64 = 0.7710628... . (End)
Dirichlet g.f.: zeta(s)*zeta(s-1)*(1-1/4^s). - Amiram Eldar, Dec 30 2022

A326399 Expansion of Sum_{k>=1} k * x^k / (1 - x^(3*k)).

Original entry on oeis.org

1, 2, 3, 5, 5, 6, 8, 10, 9, 11, 11, 15, 14, 16, 15, 21, 17, 18, 20, 27, 24, 23, 23, 30, 26, 28, 27, 40, 29, 33, 32, 42, 33, 35, 40, 45, 38, 40, 42, 55, 41, 48, 44, 57, 45, 47, 47, 63, 57, 57, 51, 70, 53, 54, 56, 80, 60, 59, 59, 81, 62, 64, 72, 85, 70, 69, 68, 87, 69, 88
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 11 2019

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 70; CoefficientList[Series[Sum[k x^k/(1 - x^(3 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[DivisorSum[n, # &, MemberQ[{1}, Mod[n/#, 3]] &], {n, 1, 70}]

Formula

a(n) = Sum_{d|n, n/d==1 (mod 3)} d.
G.f.: Sum_{k>0} x^(3*k-2) / (1 - x^(3*k-2))^2. - Seiichi Manyama, Jun 29 2023

A326400 Expansion of Sum_{k>=1} k * x^(2*k) / (1 - x^(3*k)).

Original entry on oeis.org

0, 1, 0, 2, 1, 3, 0, 5, 0, 7, 1, 6, 0, 8, 3, 10, 1, 9, 0, 15, 0, 13, 1, 15, 5, 14, 0, 16, 1, 21, 0, 21, 3, 19, 8, 18, 0, 20, 0, 35, 1, 24, 0, 27, 9, 25, 1, 30, 0, 36, 3, 28, 1, 27, 16, 40, 0, 31, 1, 45, 0, 32, 0, 42, 14, 39, 0, 39, 3, 56, 1, 45, 0, 38, 15, 40, 8, 42, 0, 71
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 11 2019

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 80; CoefficientList[Series[Sum[k x^(2 k)/(1 - x^(3 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[DivisorSum[n, # &, MemberQ[{2}, Mod[n/#, 3]] &], {n, 1, 80}]

Formula

a(n) = Sum_{d|n, n/d==2 (mod 3)} d.
G.f.: Sum_{k>0} x^(3*k-1) / (1 - x^(3*k-1))^2. - Seiichi Manyama, Jun 29 2023

A285896 Sum of divisors d of n such that n/d is not congruent to 0 mod 5.

Original entry on oeis.org

1, 3, 4, 7, 5, 12, 8, 15, 13, 15, 12, 28, 14, 24, 20, 31, 18, 39, 20, 35, 32, 36, 24, 60, 25, 42, 40, 56, 30, 60, 32, 63, 48, 54, 40, 91, 38, 60, 56, 75, 42, 96, 44, 84, 65, 72, 48, 124, 57, 75, 72, 98, 54, 120, 60, 120, 80, 90, 60, 140, 62, 96, 104, 127, 70, 144
Offset: 1

Views

Author

Seiichi Manyama, Apr 28 2017

Keywords

Examples

			The divisors of 10 are 1, 2, 5, and 10. 10/1 == 0 (mod 5) and 10/2 == 0 (mod 5). Hence, a(10) = 5 + 10 = 15.
		

Crossrefs

Cf. A002131 (k=2), A078708 (k=3), A285895 (k=4), this sequence (k=5).
Cf. A000203.

Programs

  • Mathematica
    f[p_, e_] := If[p == 5, 5^e, (p^(e+1)-1)/(p-1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 30 2022 *)
  • PARI
    a(n)=sumdiv(n, d, if(n/d%5, d, 0)); \\ Andrew Howroyd, Jul 20 2018

Formula

a(n) = (A000203(5*n)-A000203(n))/5.
G.f.: Sum_{k>=1} k*x^k*(1 + x^k + x^(2*k) + x^(3*k))/(1 - x^(5*k)). - Ilya Gutkovskiy, Sep 12 2019
From Amiram Eldar, Oct 30 2022: (Start)
Multiplicative with a(5^e) = 5^e and a(p^e) = (p^(e+1)-1)/(p-1) if p != 5.
Sum_{k=1..n} a(k) ~ c * n^2, where c = 2*Pi^2/25 = 0.789568... . (End)
Dirichlet g.f.: zeta(s)*zeta(s-1)*(1-1/5^s). - Amiram Eldar, Dec 30 2022

Extensions

Keyword:mult added by Andrew Howroyd, Jul 20 2018

A326401 Expansion of Sum_{k>=1} k * x^k / (1 + x^k + x^(2*k)).

Original entry on oeis.org

1, 1, 3, 3, 4, 3, 8, 5, 9, 4, 10, 9, 14, 8, 12, 11, 16, 9, 20, 12, 24, 10, 22, 15, 21, 14, 27, 24, 28, 12, 32, 21, 30, 16, 32, 27, 38, 20, 42, 20, 40, 24, 44, 30, 36, 22, 46, 33, 57, 21, 48, 42, 52, 27, 40, 40, 60, 28, 58, 36, 62, 32, 72, 43, 56, 30, 68, 48, 66, 32
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 11 2019

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 70; CoefficientList[Series[Sum[k x^k/(1 + x^k + x^(2 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[DivisorSum[n, # &, MemberQ[{1}, Mod[n/#, 3]] &] - DivisorSum[n, # &, MemberQ[{2}, Mod[n/#, 3]] &], {n, 1, 70}]
    f[p_, e_] := Which[p == 3, p^e, Mod[p, 3] == 1, (p^(e + 1) - 1)/(p - 1), Mod[p, 3] == 2, (p^(e + 1) + (-1)^e)/(p + 1)]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Oct 25 2020 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,1] == 3, 3^f[i,2], if(f[i,1]%3 == 1, (f[i,1]^(f[i,2]+1) - 1)/(f[i,1] - 1), (f[i,1]^(f[i,2]+1) + (-1)^f[i,2])/(f[i,1] + 1))));} \\ Amiram Eldar, Nov 06 2022

Formula

a(n) = Sum_{d|n, n/d==1 (mod 3)} d - Sum_{d|n, n/d==2 (mod 3)} d.
a(n) = A326399(n) - A326400(n).
Multiplicative with a(3^e) = 3^e, a(p^e) = (p^(e+1) - 1)/(p - 1) if p == 1 (mod 3), and (p^(e+1) + (-1)^e)/(p + 1) if p == 2 (mod 3). - Amiram Eldar, Oct 25 2020
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{primes p == 1 (mod 3)} 1/(1 - 1/p^2) * Product_{primes p == 2 (mod 3)} 1/(1 + 1/p^2) = (1/2) * A175646 * (2*Pi^2/27)/A340577 = 0.3906512064... . - Amiram Eldar, Nov 06 2022

A185717 Expansion of q^(-1) * c(q^2) * (c(q) - c(q^4)) / 9 in powers of q^2 where c() is a cubic AGM theta function.

Original entry on oeis.org

1, 3, 6, 8, 9, 12, 14, 18, 18, 20, 24, 24, 31, 27, 30, 32, 36, 48, 38, 42, 42, 44, 54, 48, 57, 54, 54, 72, 60, 60, 62, 72, 84, 68, 72, 72, 74, 93, 96, 80, 81, 84, 108, 90, 90, 112, 96, 120, 98, 108, 102, 104, 144, 108, 110, 114, 114, 144, 126, 144, 133, 126, 156, 128
Offset: 0

Views

Author

Michael Somos, Feb 10 2011

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			1 + 3*x + 6*x^2 + 8*x^3 + 9*x^4 + 12*x^5 + 14*x^6 + 18*x^7 + 18*x^8 + ...
q + 3*q^3 + 6*q^5 + 8*q^7 + 9*q^9 + 12*q^11 + 14*q^13 + 18*q^15 + ...
		

Crossrefs

Programs

  • Mathematica
    A185717[n_] := SeriesCoefficient[(QPochhammer[q^3, q^3]/QPochhammer[-q^3, q^3])^4*(1/(QPochhammer[q, q^2]*QPochhammer[q^3, q^6])^3), {q, 0, n}];
    Table[A185717[n], {n, 0, 50}] (* G. C. Greubel, Jul 10 2017 *)
  • PARI
    {a(n) = if( n<0, 0, n = 2*n + 1; sumdiv( n, d, if( (n/d) % 3, 1, 0) * d))}
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^3 * eta(x^3 + A)^5 / (eta(x + A)^3 * eta(x^6 + A)), n))}

Formula

Expansion of phi(-x^3)^4 / (chi(-x) * chi(-x^3))^3 in powers of x where phi(), chi() are Ramanujan theta functions.
Euler transform of period 6 sequence [ 3, 0, -2, 0, 3, -4, ...].
a(n) = b(2*n + 1) where b(n) is multiplicative with b(2^e) = 0^e, b(3^e) = 3^e, b(p^e) = (p^(e+1) - 1) / (p - 1) if p>3.
G.f. is a period 1 Fourier series which satisfies f(-1 / (12 t)) = 2 (t/i)^2 g(t) where q = exp(2 Pi i t) and g() is g.f. for A118271.
a(3*n + 1) = 3 * a(n). A078708(2*n + 1) = A121443(2*n + 1) = A124449(2*n + 1).
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2/9 = 1.0966227... (A100044). - Amiram Eldar, Dec 28 2023

A326503 Expansion of Sum_{k>=1} x^k * (1 - x^(2*k)) / (1 + x^k + x^(2*k))^2.

Original entry on oeis.org

1, -1, 1, 3, -4, -1, 8, -5, 1, 4, -10, 3, 14, -8, -4, 11, -16, -1, 20, -12, 8, 10, -22, -5, 21, -14, 1, 24, -28, 4, 32, -21, -10, 16, -32, 3, 38, -20, 14, 20, -40, -8, 44, -30, -4, 22, -46, 11, 57, -21, -16, 42, -52, -1, 40, -40, 20, 28, -58, -12, 62, -32, 8, 43, -56, 10
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 12 2019

Keywords

Crossrefs

Cf. A002129, A050457, A078181, A078182, A078708, A162397 (Moebius transform), A326401.

Programs

  • Mathematica
    nmax = 66; CoefficientList[Series[Sum[x^k (1 - x^(2 k))/(1 + x^k + x^(2 k))^2, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[DivisorSum[n, # &, MemberQ[{1}, Mod[#, 3]] &] - DivisorSum[n, # &, MemberQ[{2}, Mod[#, 3]] &], {n, 1, 66}]
    f[p_, e_] := If[Mod[p, 3] == 1, (p^(e + 1) - 1)/(p - 1), ((-p)^(e + 1) - 1)/(-p - 1)]; f[3, e_] := 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 28 2023 *)
  • PARI
    a(n)={sumdiv(n, d, d*((d+1)%3-1))} \\ Andrew Howroyd, Sep 12 2019

Formula

a(n) = Sum_{d|n, d==1 (mod 3)} d - Sum_{d|n, d==2 (mod 3)} d.
a(n) = A078181(n) - A078182(n).
Multiplicative with a(3^e) = 1, a(p^e) = (p^(e+1)-1)/(p-1) if p == 1 (mod 3) and a(p^e) = ((-p)^(e+1)-1)/(-p-1) if p == 2 (mod 3). - Amiram Eldar, Nov 28 2023
Showing 1-10 of 10 results.