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-6 of 6 results.

A067856 Sum_{n >= 1} a(n)/n^s = 1/(Sum_{n >= 1} (-1)^(n + 1)/n^s).

Original entry on oeis.org

1, 1, -1, 2, -1, -1, -1, 4, 0, -1, -1, -2, -1, -1, 1, 8, -1, 0, -1, -2, 1, -1, -1, -4, 0, -1, 0, -2, -1, 1, -1, 16, 1, -1, 1, 0, -1, -1, 1, -4, -1, 1, -1, -2, 0, -1, -1, -8, 0, 0, 1, -2, -1, 0, 1, -4, 1, -1, -1, 2, -1, -1, 0, 32, 1, 1, -1, -2, 1, 1, -1, 0, -1, -1, 0, -2, 1, 1, -1, -8, 0, -1, -1, 2, 1, -1, 1, -4, -1, 0, 1, -2, 1, -1, 1, -16, -1, 0, 0, 0
Offset: 1

Views

Author

Leroy Quet, Feb 15 2002

Keywords

Comments

Dirichlet inverse of A062157. - R. J. Mathar, Jul 15 2010
The first 31 terms equal the values of the Ramanujan sum c_n(8) -- see for example A085906 -- but a(32) <> c_{32}(8). - R. J. Mathar, Apr 02 2011
From Peter Bala, Mar 12 2019: (Start)
Let Mu(n) = (-1)^(n+1)*a(n), an analog of the Möbius function mu(n). Then for arithmetic functions f(n) and g(n) we have the following analog of the Möbius inversion formula: f(n) = Sum_{d divides n} (-1)^((1+d)*(1+n/d))*g(d) iff g(n) = Sum_{d divides n} (-1)^((1+d)*(1+n/d))*Mu(n/d)*f(d).
Each of the following two equations implies the other: F(x) = Sum_{n >= 1} (-1)^(n+1)*G(n*x); G(x) = Sum_{n >= 1} a(n)*F(n*x). See G. Pólya and G. Szegő, Part V111, Chap. 1, Nos. 66-68.2. (End)
Let D(n) denote the set of partitions of n into distinct parts. Then Sum_{parts k in D(n)} a(k) = |D(n-1)| = A000009(n-1). For example, D(6) = {6, 1 + 5, 2 + 4, 1 + 2 + 3} and the sum a(6) + (a(1) + a(5)) + (a(2) + a(4)) + (a(1) + a(2) + a(3)) = 3 = |D(5)|. - Peter Bala, Mar 14 2019
From Petros Hadjicostas, Jul 25 2020: (Start)
For p prime >= 2, Petrogradsky (2003) defined the multiplicative functions 1_p and mu_p in the following way:
1_p(n) = 1 when gcd(n,p) = 1 and 1_p(n) = 1 - p when gcd(n,p) = p;
mu_p(n) = mu(n) when gcd(n,p) = 1 and mu_p(n) = mu(m)*(p^s - p^(s-1)) when n = m*p^s with gcd(m,p) = 1 and s >= 1.
We have 1_2(n) = A062157(n), 1_3(n) = A061347(n) (with offset 1), a(n) = mu_2(n), and A117997(n) = mu_3(n) for n >= 1.
Some of the results by other contributors can be generalized:
(i) Rogel's (1897) formula becomes Sum_{d | n} 1_p(d) * mu_p(n/d) = 0 for n > 1. Thus, 1_p is the Dirichlet inverse of mu_p.
(ii) R. J. Mathar's Dirichlet g.f. for mu_p becomes 1/(zeta(s) * (1 - p^(1-s))). The Dirichlet g.f. for 1_p is zeta(s) * (1 - p^(1-s)).
(iii) Benoit Cloitre's formula becomes 1 = Sum_{k=1..n} mu_p(k)*g_p(n/k), where g_p(x) = floor(x) - p*floor(x/p) = floor(x) mod p.
(iv) Paul D. Hanna's formula becomes Sum_{n >= 1} (mu_p(n)/n)*log((1 - x^(n*p))/(1 - x^n)) = x.
(v) The definition of A117997 generalizes to Sum_{d | n} mu_p(d) = n, if n = p^s for s >= 0, and = 0, otherwise.
(vi) By differentiating both sides of (iv) w.r.t. x and multiplying both sides by x, we get Sum_{n >= 1} mu_p(n)*(x^n + 2*x^(2*n) + ... + (p-1)*x^(n*(p-1)))/(1 + x^n + x^(2*n) + ... + x^(n*(p-1))) = x, which generalizes one of Peter Bala's formulas. It can be thought as a "generalized Lambert series".
(vii) Obviously, f(n) = Sum_{d | n} 1_p(n/d)*g(d) if and only if g(n) = Sum_{d | n} mu_p(n/d)*f(d). (End)

References

  • G. Pólya and G. Szegő, Problems and Theorems in Analysis Volume II. Springer_Verlag 1976.

Crossrefs

Cf. A000009, A038712, A038838, A048298 (inverse Mobius transform), A061347, A062157, A085906, A117997, A321088 (Euler transform), A321558.

Programs

  • Mathematica
    a[n_] := If[n == 1, 1, Product[{p, e} = pe; If[2 == p, e--, If[e > 1, p = 0, p = -1]]; p^e, {pe, FactorInteger[n]}]];
    a /@ Range[1, 100] (* Jean-François Alcover, Oct 01 2019 *)
  • PARI
    {a(n)=local(k); if(n<1, 0, k=valuation(n, 2); moebius(n/2^k)*2^max(0, k-1))} /* Michael Somos, Aug 22 2006 */
    
  • PARI
    A067856(n) =  { my(f=factor(n)); for(i=1,#f~,if(2==f[i,1],f[i,2]--,if(f[i,2]>1,f[i,1]=0,f[i,1]=-1))); factorback(f); }; \\ Antti Karttunen, Sep 27 2018, after Vladeta Jovovic_'s multiplicative formula.

Formula

a(1) = 1 and a(n) = Sum{k | n, 1 < k} (-1)^k a(n/k) for n >= 2; the sum is over the divisors, k, of n, where k > 1. If n is odd, a(n) = mu(n), where mu(.) is the Moebius function. If n is even, a(n) = mu(m)* 2^(k-1), where n = m*2^k, m is odd integer, and k is a positive integer.
Sum_{n > 0} a(n)*x^n/(1 + x^n) = x. Moebius transform of A048298. Multiplicative with a(2^e) = 2^(e - 1), a(p) = -1 for p > 2, a(p^e) = 0 for p > 2 and e > 1. - Vladeta Jovovic, Jan 02 2003
Sum_{n > 0} a(n)*log(1 + x^n)/n = x. - Paul D. Hanna, May 06 2003
a(n) = 0 if and only if n is divisible by the square of an odd prime (A038838). - Michael Somos, Aug 22 2006
1 = Sum_{k=1..n} a(k)*g(n/k), where g(x) = floor(x) - 2*floor(x/2). - Benoit Cloitre, Nov 11 2010
Dirichlet g.f.: 1/( zeta(s) * (1 - 2^(1-s)) ). - R. J. Mathar, Apr 02 2011
From Peter Bala, Mar 13 2019: (Start)
Sum_{n >= 1} a(n)*x^n/(1 + x^n) = x
Sum_{n >= 1} a(n)*x^n/(1 - x^n) = x + 2*x^2 + 4*x^4 + 8*x^8 + 16*x^16 + ...
Sum_{n >= 1} a(n)*x^n/(1 + (-x)^n) = x + 2*(x^2 + x^4 + x^8 + x^16 + ...)
Sum_{n >= 1} a(n)*x^n/(1 - (-x)^n) = x + 2*(x^4 + 3*x^8 + 7*x^16 + 15*x^32 + ...). (End)
G.f. A(x) satisfies: A(x) = x + A(x^2) - A(x^3) + A(x^4) - A(x^5) + ... - Ilya Gutkovskiy, May 11 2019
Sum_{k=1..n} abs(a(k)) ~ 2*n*(log(n) - 1 + gamma + 11*log(2)/6 - 12*zeta'(2)/Pi^2) / (log(2)*Pi^2), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, May 30 2024

A322083 Square array A(n,k), n >= 1, k >= 0, read by antidiagonals: A(n,k) = Sum_{d|n} (-1)^(n/d+d)*d^k.

Original entry on oeis.org

1, 1, -2, 1, -3, 2, 1, -5, 4, -1, 1, -9, 10, -3, 2, 1, -17, 28, -13, 6, -4, 1, -33, 82, -57, 26, -12, 2, 1, -65, 244, -241, 126, -50, 8, 0, 1, -129, 730, -993, 626, -252, 50, -3, 3, 1, -257, 2188, -4033, 3126, -1394, 344, -45, 13, -4, 1, -513, 6562, -16257, 15626, -8052, 2402, -441, 91, -18, 2
Offset: 1

Views

Author

Ilya Gutkovskiy, Nov 26 2018

Keywords

Comments

For each k, the k-th column sequence (T(n,k))(n>=1) is a multiplicative function of n, equal to (-1)^(n+1)*(Id_k * 1) in the notation of the Bala link. - Peter Bala, Mar 19 2022

Examples

			Square array begins:
   1,   1,   1,    1,     1,     1,  ...
  -2,  -3,  -5,   -9,   -17,   -33,  ...
   2,   4,  10,   28,    82,   244,  ...
  -1,  -3, -13,  -57,  -241,  -993,  ...
   2,   6,  26,  126,   626,  3126,  ...
  -4, -12, -50, -252, -1394, -8052,  ...
		

Crossrefs

Programs

  • Mathematica
    Table[Function[k, Sum[(-1)^(n/d+d) d^k, {d, Divisors[n]}]][i - n], {i, 0, 11}, {n, 1, i}] // Flatten
    Table[Function[k, SeriesCoefficient[Sum[(-1)^(j + 1) j^k x^j/(1 + x^j), {j, 1, n}], {x, 0, n}]][i - n], {i, 0, 11}, {n, 1, i}] // Flatten
    f[p_, e_, k_] := If[k == 0, e + 1, (p^(k*e + k) - 1)/(p^k - 1)]; f[2, e_, k_] := If[k == 0, e - 3, -((2^(k - 1) - 1)*2^(k*e + 1) + 2^(k + 1) - 1)/(2^k - 1)]; T[1, k_] = 1; T[n_, k_] := Times @@ (f[First[#], Last[#], k] & /@ FactorInteger[n]); Table[T[n - k, k], {n, 1, 11}, {k, n - 1, 0, -1}] // Flatten (* Amiram Eldar, Nov 22 2022 *)
  • PARI
    T(n,k)={sumdiv(n, d, (-1)^(n/d+d)*d^k)}
    for(n=1, 10, for(k=0, 8, print1(T(n, k), ", ")); print); \\ Andrew Howroyd, Nov 26 2018

Formula

G.f. of column k: Sum_{j>=1} (-1)^(j+1)*j^k*x^j/(1 + x^j).

A228441 G.f.: Sum_{k>0} -(-x)^k / (1 + x^k).

Original entry on oeis.org

1, -2, 2, -1, 2, -4, 2, 0, 3, -4, 2, -2, 2, -4, 4, 1, 2, -6, 2, -2, 4, -4, 2, 0, 3, -4, 4, -2, 2, -8, 2, 2, 4, -4, 4, -3, 2, -4, 4, 0, 2, -8, 2, -2, 6, -4, 2, 2, 3, -6, 4, -2, 2, -8, 4, 0, 4, -4, 2, -4, 2, -4, 6, 3, 4, -8, 2, -2, 4, -8, 2, 0, 2, -4, 6, -2, 4
Offset: 1

Views

Author

Michael Somos, Nov 02 2013

Keywords

Examples

			G.f. = x - 2*x^2 + 2*x^3 - x^4 + 2*x^5 - 4*x^6 + 2*x^7 + 3*x^9 - 4*x^10 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ Sum[ -(-x)^k / (1 + x^k), {k, 1, n}], {x, 0, n}];
    a[ n_] := If[ n < 1, 0, DivisorSum[ n, (-1)^(# + n/#) &]]; (* Michael Somos, Jan 08 2015 *)
    a[n_] := Module[{e = IntegerExponent[n, 2]}, DivisorSigma[0, n] * If[e == 0, 1, (e-3)/(e+1)]]; Array[a, 100] (* Amiram Eldar, Sep 18 2023 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, k, (-1)^(k + n/k)))};
    
  • PARI
    {a(n) = if( n<1, 0, numdiv(n) - 4 * sumdiv( n, k, k%4 == 2))};
    
  • PARI
    {a(n) = my(e); if( n<1, 0, e = valuation( n, 2); numdiv( n/2^e) * if( e>0, e-3, 1))};
    
  • PARI
    a(n)=direuler(p=1,n,if(p==2,(1-2*X)^2/(1-X)^2,1/(1-X)^2))[n] /* Ralf Stephan, Mar 27 2015 */

Formula

a(n) = number of divisors of n minus 4 times number of divisors of n of the form 4*k+2.
a(n) = Sum_{d|n} (-1)^(d+n/d). - N. J. A. Sloane, Nov 23 2018
Multiplicative with a(2^e) = e-3 if e>0, a(p^e) = e+1 if p>2.
Moebius transform is period 4 sequence [1, -3, 1, 1, ...].
G.f.: Sum_{k>0} x^k / (1 - x^k) - 4 * x^(4*k + 2) / (1 - x^(4*k + 2)).
a(2*n - 1) = A099774(n).
Dirichlet g.f.: zeta(s)^2*(1-2^(-s+1))^2 = eta^2(s) (the Dirichlet eta). - Ralf Stephan, Mar 27 2015
a(16n+8) = a(A051062(n)) = 0. - Michel Marcus, Mar 27 2015
O.g.f.: Sum_{n >= 1} (-1)^(n*(n+1))*x^(n^2)*(1 - x^n)/(1 + x^n). - Peter Bala, Mar 11 2019
Conjecture: a(n) = (7 - 2*(-1)^n)*tau(n) - 4*tau(2*n) = 5*tau(n) - (3 + (-1)^n)*tau(2*n), where tau = A000005. - Velin Yanev, Dec 17 2019
The proof of the above conjecture easily follows from the fact that both a(n) and tau(n) are multiplicative arithmetical functions and tau(p^e) = e + 1 for prime p. - Peter Bala, Jan 28 2022
a(n) = A000005(n) if n is odd, and A000005(n) * (A007814(n)-3)/(A007814(n)+1) if n is even. - Amiram Eldar, Sep 18 2023

A259445 Multiplicative with a(n) = n if n is odd and a(2^s)=2.

Original entry on oeis.org

1, 2, 3, 2, 5, 6, 7, 2, 9, 10, 11, 6, 13, 14, 15, 2, 17, 18, 19, 10, 21, 22, 23, 6, 25, 26, 27, 14, 29, 30, 31, 2, 33, 34, 35, 18, 37, 38, 39, 10, 41, 42, 43, 22, 45, 46, 47, 6, 49, 50, 51, 26, 53, 54, 55, 14, 57, 58, 59, 30, 61, 62, 63, 2, 65, 66, 67, 34
Offset: 1

Views

Author

Keywords

Comments

If n = 2^s*m with m odd and s > 0 then a(n) = 2*m.

Crossrefs

Programs

  • Maple
    A259445 := proc(n::integer)
        local a, pe, p,e ;
        a := 1 ;
        for pe in ifactors(n)[2] do
            p := op(1,pe) ;
            e := op(2,pe) ;
            if p = 2 then
                a := 2*a ;
            else
                a := a*p^e  ;
            end if;
        end do:
        a;
    end proc:
    seq(A259445(n),n=1..80) ; # R. J. Mathar, Feb 21 2025
  • Mathematica
    G[n_] := If[Mod[n, 2] == 0, n/2^(FactorInteger[n][[1, 2]] - 1), n]; Table[G[n], {n, 1, 70}]
  • PARI
    a(n)=n>>max(valuation(n,2)-1,0) \\ Charles R Greathouse IV, Jun 28 2015

Formula

From Peter Bala, Feb 21 2019: (Start)
a(n) = n*gcd(n,2)/gcd(n,2^n).
a(2*n) = 2*A000265(2*n); a(2*n+1) = A000265(2*n+1).
O.g.f.: x*(1 + 4*x + x^2)/(1 - x^2)^2 - 2*( F(x^2) + F(x^4) + F(x^8) + ... ), where F(x) = x/(1 - x)^2.
O.g.f. for reciprocals: Sum_{n >= 1} (1/a(n))*x^n = (3/4)*L(x) - (1/4)*L(-x) + (1/4)*( L(x^2) + L(x^4) + L(x^8) + ... ), where L(x) = log(1/(1 - x)).
(End)
From Peter Bala, Mar 09 2019: (Start)
a(n) = (-1)^(n+1)*Sum_ {d divides n} (-1)^(d+n/d)*phi(d), where phi(n) = A000010(n) is the Euler totient function. Cf. the identity n = Sum_ {d divides n} phi(d). Cf. A046897 and A321558.
O.g.f.: Sum_{n >= 1} phi(n)*x^n/(1 + (-x)^n). (End)
From Amiram Eldar, Nov 28 2022: (Start)
Dirichlet g.f.: zeta(s-1)*(1 + 1/2^(s-1) - 2/(2^s-1)).
Sum_{k=1..n} a(k) ~ (5/12) * n^2. (End)
a(n) = n /A160467(n). - R. J. Mathar, Feb 21 2025

A328667 a(n) = Sum_{d divides n} (-1)^(n + 1 + d + n/d) * d^2.

Original entry on oeis.org

1, 5, 10, 13, 26, 50, 50, 45, 91, 130, 122, 130, 170, 250, 260, 173, 290, 455, 362, 338, 500, 610, 530, 450, 651, 850, 820, 650, 842, 1300, 962, 685, 1220, 1450, 1300, 1183, 1370, 1810, 1700, 1170, 1682, 2500, 1850, 1586, 2366, 2650, 2210, 1730, 2451, 3255
Offset: 1

Views

Author

Michael Somos, Oct 24 2019

Keywords

Examples

			G.f. = x + 5*x^2 + 10*x^3 + 13*x^4 + 26*x^5 + 50*x^6 + 50*x^7 + 45*x^8 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 1, 0, DivisorSum[n, (-1)^(n + 1 + # + n/#) #^2 &]];
  • PARI
    {a(n) = sumdiv(n, d, (-1)^(n + 1 + n\d + d)*d^2)};

Formula

Multiplicative with a(2^e) = (2^(2*e+1) + 7)/3 = A321358(e) if e>0, else a(p^e) = (p^(2*e+2) - 1)/(p^2 - 1).
G.f.: Sum_{k>=1} k^2 * x^k/(1 + (-x)^k) = Sum_{k>=1} x^k*(1 - (-x)^k)/(1 + (-x)^k)^3.
a(n) = -(-1)^n*A321558(n). a(2*n - 1) = A001157(2*n - 1) = A099978(n). a(4*n + 2) = A001157(4*n + 2).
Sum_{k=1..n} a(k) ~ c * n^3, where c = 7*zeta(3)/24 = 0.350599... . - Amiram Eldar, Nov 01 2022

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

Original entry on oeis.org

1, -1, 1, 3, 1, -5, 1, 3, 10, -5, 1, -6, 1, -5, 10, 19, 1, -14, 1, -13, 10, -5, 1, 10, 26, -5, 10, -13, 1, -39, 1, 19, 10, -5, 26, 14, 1, -5, 10, -6, 1, -50, 1, -13, 35, -5, 1, 46, 50, -30, 10, -13, 1, -50, 26, -30, 10, -5, 1, -11, 1, -5, 59, 83, 26, -50, 1, -13, 10, -79
Offset: 1

Views

Author

Ilya Gutkovskiy, May 07 2024

Keywords

Crossrefs

Programs

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

Formula

a(n) = Sum_{d|n, d <= sqrt(n)} (-1)^(d + n/d) * d^2.
Showing 1-6 of 6 results.