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-18 of 18 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).

A357845 Numerators of the partial alternating sums of the reciprocals of the sum of divisors function (A000203).

Original entry on oeis.org

1, 2, 11, 65, 79, 6, 55, 769, 10837, 30691, 33421, 32251, 34591, 16613, 34591, 1039561, 365327, 356647, 373573, 365513, 1504367, 4400261, 4569521, 4501817, 149447, 146327, 149603, 147263, 151631, 49937, 25651, 75913, 38639, 114097, 232289, 230129, 4470731, 4408487
Offset: 1

Views

Author

Amiram Eldar, Oct 16 2022

Keywords

Examples

			Fractions begin with 1, 2/3, 11/12, 65/84, 79/84, 6/7, 55/56, 769/840, 10837/10920, 30691/32760, 33421/32760, 32251/32760, ...
		

Crossrefs

Cf. A000203, A065442, A065443, A068762, A357846 (denominators).
Similar sequence: A104528, A212717, A357820.

Programs

  • Mathematica
    Numerator[Accumulate[Array[(-1)^(# + 1)/DivisorSigma[1, #] &, 60]]]
  • PARI
    lista(nmax) = {my(s = 0); for(k = 1, nmax, s += (-1)^(k+1) / sigma(k); print1(numerator(s), ", "))};
    
  • Python
    from fractions import Fraction
    from sympy import divisor_sigma
    def A357845(n): return sum(Fraction(1 if k&1 else -1, divisor_sigma(k)) for k in range(1,n+1)).numerator # Chai Wah Wu, Oct 16 2022

Formula

a(n) = numerator(Sum_{k=1..n} (-1)^(k+1)/sigma(k)), where sigma(k) = A000203(k).
a(n)/A357846(n) ~ E * ((2/K-1)*(log(n) + gamma + F) + 2*log(2)*K'/K^2) + O(log(n)^(5/3)*log(log(n))^(4/3)/n), where E = Product_{p prime} alpha(p), F = Sum_{p prime} (p-1)^2*beta(p)*log(p)/(p*alpha(p)), alpha(p) = 1 - ((p-1)^2/p) * Sum_{k>=1} 1/((p^k-1)*(p^(k+1)-1)), beta(p) = Sum_{k>=1} k/((p^k-1)*(p^(k+1)-1)), K = A065442, K' = A065443 (Tóth, 2017).

A357846 Denominators of the partial alternating sums of the reciprocals of the sum of divisors function (A000203).

Original entry on oeis.org

1, 3, 12, 84, 84, 7, 56, 840, 10920, 32760, 32760, 32760, 32760, 16380, 32760, 1015560, 338520, 338520, 338520, 338520, 1354080, 4062240, 4062240, 4062240, 131040, 131040, 131040, 131040, 131040, 43680, 21840, 65520, 32760, 98280, 196560, 196560, 3734640, 3734640
Offset: 1

Views

Author

Amiram Eldar, Oct 16 2022

Keywords

Comments

See A357845 for more details.

Crossrefs

Cf. A000203, A068762, A357845 (numerators).
Similar sequence: A104529, A212718, A357821.

Programs

  • Mathematica
    Denominator[Accumulate[Array[(-1)^(# + 1)/DivisorSigma[1, #] &, 60]]]
  • PARI
    lista(nmax) = {my(s = 0); for(k = 1, nmax, s += (-1)^(k+1) / sigma(k); print1(denominator(s), ", "))};
    
  • Python
    from fractions import Fraction
    from sympy import divisor_sigma
    def A357846(n): return sum(Fraction(1 if k&1 else -1, divisor_sigma(k)) for k in range(1,n+1)).denominator # Chai Wah Wu, Oct 16 2022

Formula

a(n) = denominator(Sum_{k=1..n} (-1)^(k+1)/sigma(k)), where sigma(k) = A000203(k).

A379921 Partial alternating sums of the sigma_2 function: a(n) = Sum_{k=1..n} (-1)^(k+1) * sigma_2(k).

Original entry on oeis.org

1, -4, 6, -15, 11, -39, 11, -74, 17, -113, 9, -201, -31, -281, -21, -362, -72, -527, -165, -711, -211, -821, -291, -1141, -490, -1340, -520, -1570, -728, -2028, -1066, -2431, -1211, -2661, -1361, -3272, -1902, -3712, -2012, -4222, -2540, -5040, -3190, -5752, -3386
Offset: 1

Views

Author

Amiram Eldar, Jan 06 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[(-1)^(k+1) * DivisorSigma[2, k], {k, 1, 100}]]
  • PARI
    list(lim) = {my(s = 0); for(k = 1, lim, s += (-1)^(k+1) * sigma(k, 2); print1(s, ", "));}

Formula

a(n) ~ -zeta(3) * n^3 / 24.
In general, for m >= 2, Sum_{k=1..n} (-1)^(k+1) * sigma_m(k) ~ -zeta(m+1) * n^(m+1) / ((m+1)*2^(m+1)).

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... .

A181054 Numbers n such that Sum_{k=1..n} (-1)^(n-k)*sigma(k) is prime.

Original entry on oeis.org

2, 3, 4, 6, 10, 22, 24, 32, 64, 66, 68, 92, 102, 112, 134, 168, 240, 262, 264, 270, 274, 316, 396, 442, 448, 538, 540, 542, 554, 560, 562, 582, 608, 612, 650, 652, 654, 668, 672, 786, 788, 866, 880, 924, 938, 940, 942, 948, 984, 988, 1008, 1018, 1064, 1074
Offset: 1

Views

Author

Michel Lagneau, Oct 01 2010

Keywords

Comments

These are the positions of primes in (-1)^(n-1)*A068762(n) = 1, 2, 2, 5, 1, 11, -3, 18, -5, 23, ... [R. J. Mathar, Nov 18 2010]
The first primes generated by the alternating sum are 2, 2, 5, 11, 23, 103, 139, 239, 859, 919, 977, 1811, 2207, 2657, ...

Examples

			4 is in the sequence because Sum_{k=1..4} (-1)^(4-k)*sigma(k) = (-1)^3*1 + (-1)^2*3 + (-1)^1*4 + (-1)^0*7 = -1 + 3 - 4 + 7 = 5 is prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 2000 do:x:=sum((((-1)^(n-k))*sigma(k),k=1..n)): if type(x,prime)=true then printf(`%d, `, n):else fi:od:
  • PARI
    isok(n) = isprime(sum(k=1, n, (-1)^(n-k)*sigma(k))); \\ Michel Marcus, Oct 04 2017
Previous Showing 11-18 of 18 results.