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.

Previous Showing 11-16 of 16 results.

A370899 Partial alternating sums of the unitary totient function (A047994).

Original entry on oeis.org

1, 0, 2, -1, 3, 1, 7, 0, 8, 4, 14, 8, 20, 14, 22, 7, 23, 15, 33, 21, 33, 23, 45, 31, 55, 43, 69, 51, 79, 71, 101, 70, 90, 74, 98, 74, 110, 92, 116, 88, 128, 116, 158, 128, 160, 138, 184, 154, 202, 178, 210, 174, 226, 200, 240, 198, 234, 206, 264, 240, 300, 270
Offset: 1

Views

Author

Amiram Eldar, Mar 05 2024

Keywords

Crossrefs

Similar sequences: A068762, A068773, A307704, A357817, A362028.

Programs

  • Mathematica
    uphi[n_] := Times @@ (-1 + Power @@@ FactorInteger[n]); uphi[1] = 1; Accumulate[Array[(-1)^(# + 1) * uphi[#] &, 100]]
  • PARI
    uphi(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^f[i, 2] - 1);}
    lista(kmax) = {my(s = 0); for(k = 1, kmax, s += (-1)^(k+1) * uphi(k); print1(s, ", "))};

Formula

a(n) = Sum_{k=1..n} (-1)^(k+1) * A047994(k).
a(n) = c * n^2 + O(n * log(n)^(5/3) * log(log(n))^(4/3)), where c = A065463 / 10 = 0.07044422... (Tóth, 2017).

A370904 Partial alternating sums of the sum of the bi-unitary divisors function (A188999).

Original entry on oeis.org

1, -2, 2, -3, 3, -9, -1, -16, -6, -24, -12, -32, -18, -42, -18, -45, -27, -57, -37, -67, -35, -71, -47, -107, -81, -123, -83, -123, -93, -165, -133, -196, -148, -202, -154, -204, -166, -226, -170, -260, -218, -314, -270, -330, -270, -342, -294, -402, -352, -430
Offset: 1

Views

Author

Amiram Eldar, Mar 05 2024

Keywords

Crossrefs

Similar sequences: A068762, A068773, A307704, A357817, A362028.

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], (p^(e+1)-1)/(p-1), (p^(e+1)-1)/(p-1)-p^(e/2)]; bsigma[1] = 1; bsigma[n_] := Times @@ f @@@ FactorInteger[n]; Accumulate[Array[(-1)^(# + 1) * bsigma[#] &, 100]]
  • PARI
    bsigma(n) = {my(f = factor(n)); prod(i=1, #f~, p = f[i, 1]; e = f[i, 2]; if(e%2, (p^(e+1)-1)/(p-1), (p^(e+1)-1)/(p-1)-p^(e/2)));}
    lista(kmax) = {my(s = 0); for(k = 1, kmax, s += (-1)^(k+1) * bsigma(k); print1(s, ", "))};

Formula

a(n) = Sum_{k=1..n} (-1)^(k+1) * A188999(k).
a(n) = -(11/53) * c * n^2 + O(n * log(n)^3), where c = A307160 (Tóth, 2017).

A247418 a(n) = Sum_{i=1..n} mu(i)*(-1)^(i+1).

Original entry on oeis.org

1, 2, 1, 1, 0, -1, -2, -2, -2, -3, -4, -4, -5, -6, -5, -5, -6, -6, -7, -7, -6, -7, -8, -8, -8, -9, -9, -9, -10, -9, -10, -10, -9, -10, -9, -9, -10, -11, -10, -10, -11, -10, -11, -11, -11, -12, -13, -13, -13, -13, -12, -12, -13, -13, -12, -12, -11, -12, -13
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 16 2014

Keywords

Comments

Alternating sums of mu(n), the Moebius function (A008683), from 1 to n.

Examples

			a(n) = mu(1) - mu(2) + mu(3) - mu(4) + ... + (-1)^(n+1) * mu(n).
		

Crossrefs

Cf. A008683 (moebius function).
Cf. A068773 (alternating sums of eulerphi(n)).
Cf. A068762 (alternating sums of sigma(n)).

Programs

  • Maple
    with(numtheory): A247418:=n->add(mobius(i)*(-1)^(i+1), i=1..n): seq(A247418(n), n=1..50);
  • Mathematica
    Table[Sum[MoebiusMu[i] (-1)^(i + 1), {i, n}], {n, 50}]
    Accumulate[Table[MoebiusMu[n](-1)^(n+1),{n,60}]] (* Harvey P. Dale, Oct 19 2018 *)
  • PARI
    a(n) = sum(i=1, n, moebius(i)*(-1)^(i+1)); \\ Michel Marcus, Sep 18 2014

Formula

a(n) = Sum_{i=1..n} A008683(i)*(-1)^(i+1).

A083239 First order recursion: a(0) = 1; a(n) = phi(n) - a(n-1) = A000010(n) - a(n-1).

Original entry on oeis.org

1, 0, 1, 1, 1, 3, -1, 7, -3, 9, -5, 15, -11, 23, -17, 25, -17, 33, -27, 45, -37, 49, -39, 61, -53, 73, -61, 79, -67, 95, -87, 117, -101, 121, -105, 129, -117, 153, -135, 159, -143, 183, -171, 213, -193, 217, -195, 241, -225, 267, -247, 279, -255, 307, -289, 329, -305, 341, -313, 371, -355, 415, -385, 421, -389, 437, -417
Offset: 0

Views

Author

Labos Elemer, Apr 23 2003

Keywords

Comments

Provides interesting decomposition: phi(n) = u+w, where u and w consecutive terms of this sequence. Depends also on initial value.

Crossrefs

Programs

  • Maple
    A083239 := proc(n)
        option remember ;
        if n = 0 then
            1 ;
        else
            numtheory[phi](n)-procname(n-1) ;
        end if;
    end proc:
    seq(A083239(n),n=0..100) ; # R. J. Mathar, Jun 20 2021
  • Mathematica
    a[n_] := a[n] = EulerPhi[n] -a[n-1]; a[0] = 1; Table[a[n], {n, 0, 100}]
  • Python
    # uses programs from A002088 and A049690
    def A083239(n): return A002088(n)-(A049690(n>>1)<<1)-1 if n&1 else 1+(A049690(n>>1)<<1)-A002088(n) # Chai Wah Wu, Aug 04 2024

Formula

a(n) + a(n-1) = A000010(n).
a(n) = (-1)^n * (1 - A068773(n)) for n >= 1. - Amiram Eldar, Mar 05 2024

Extensions

a(0)=1 prepended by R. J. Mathar, Jun 20 2021

A375020 Alternating sum phi(1) - phi(2) + phi(3) - phi(4) + ... + ((-1)^(10^n+1))*phi(10^n).

Original entry on oeis.org

1, 6, 970, 101130, 10129180, 1013176996, 101320714074, 10132113873280, 1013211797886962, 101321183436796684, 10132118360452306248, 1013211836390484051818, 101321183641942857932324, 10132118364229503528908162, 1013211836423347845936784704
Offset: 0

Views

Author

Chai Wah Wu, Aug 04 2024

Keywords

Comments

Digits of terms converge towards 1/Pi^2 = 0.1013211836423...

Crossrefs

Programs

Formula

a(n) = A068773(10^n).

A379714 Partial alternating sums of the number of exponential divisors function (A049419).

Original entry on oeis.org

1, 0, 1, -1, 0, -1, 0, -2, 0, -1, 0, -2, -1, -2, -1, -4, -3, -5, -4, -6, -5, -6, -5, -7, -5, -6, -4, -6, -5, -6, -5, -7, -6, -7, -6, -10, -9, -10, -9, -11, -10, -11, -10, -12, -10, -11, -10, -13, -11, -13, -12, -14, -13, -15, -14, -16, -15, -16, -15, -17, -16
Offset: 1

Views

Author

Amiram Eldar, Dec 30 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_]  := DivisorSigma[0, e]; ediv[n_] := Times @@ f @@@ FactorInteger[n]; Accumulate[Table[(-1)^(n+1)*ediv[n], {n, 1, 100}]]
  • PARI
    ediv(n) = vecprod(apply(numdiv, factor(n)[, 2]));
    list(nmax) = {my(s = 0); for(k = 1, nmax, s += (-1)^(k+1) * ediv(k); print1(s, ", "))};

Formula

a(n) = Sum_{k=1..n} (-1)^(k+1) * A049419(k).
Limit_{n->oo} a(n)/n = A327837 * (2/(A065442 + 1) - 1) = -0.37293122584744001729... .
Previous Showing 11-16 of 16 results.