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

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

Original entry on oeis.org

1, 0, 2, 0, 4, 2, 8, 4, 10, 6, 16, 12, 24, 18, 26, 18, 34, 28, 46, 38, 50, 40, 62, 54, 74, 62, 80, 68, 96, 88, 118, 102, 122, 106, 130, 118, 154, 136, 160, 144, 184, 172, 214, 194, 218, 196, 242, 226, 268, 248, 280, 256, 308, 290, 330, 306, 342, 314, 372, 356
Offset: 1

Views

Author

Klaus Brockhaus, Feb 28 2002

Keywords

Examples

			a(3) = phi(1) - phi(2) + phi(3) = 1 - 1 + 2 = 2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): seq(add((-1)^(k+1)*phi(k),k=1..n), n=1..80); # Ridouane Oudra, Mar 22 2024
  • Mathematica
    Accumulate[Array[(-1)^(# + 1) * EulerPhi[#] &, 100]] (* Amiram Eldar, Oct 14 2022 *)
  • PARI
    a068773(m)=local(s,n); s=0; for(n=1,m, if(n%2==0,s=s-eulerphi(n),s=s+eulerphi(n)); print1(s,","))
    
  • Python
    # uses code from A002088 and A049690
    def A068773(n): return A002088(n)-(A049690(n>>1)<<1) # Chai Wah Wu, Aug 04 2024

Formula

a(n) = Sum_{k=1..n} (-1)^(k+1)*phi(k).
a(n) = n^2/Pi^2 + O(n * log(n)^(2/3) * log(log(n))^(4/3)) (Tóth, 2017). - Amiram Eldar, Oct 14 2022
a(n) = 3*A002088(n) - 2*A049690(n). - Ridouane Oudra, Mar 22 2024
a(n) = A002088(n) - 2*A049690(floor(n/2)). - Chai Wah Wu, Aug 04 2024

A379922 Numbers m that divide the alternating sum Sum_{k=1..m} (-1)^(k+1) * sigma_2(k).

Original entry on oeis.org

1, 2, 3, 42, 329, 633, 1039, 5689, 26621, 39245, 1101875, 1216075, 40088584, 67244920, 104332211, 549673265, 777631064, 19879301756
Offset: 1

Views

Author

Amiram Eldar, Jan 06 2025

Keywords

Comments

Numbers m such that m | A379921(m).
The corresponding quotients, A379921(m)/m, are -1, 2, -2, 120, 5228, ... (see the link for more values).
a(19) > 5*10^10, if it exists.

Crossrefs

Cf. A001157 (sigma_2), A379921.

Programs

  • Mathematica
    With[{m = 40000}, Position[Accumulate[Table[(-1)^n * DivisorSigma[2, n], {n, 1, m}]]/Range[m], _?IntegerQ] // Flatten]
  • PARI
    list(lim) = my(s = 0); for(k = 1, lim, s += (-1)^k * sigma(k, 2); if(!(s % k), print1(k, ", ")));

A379923 Numbers m that divide the alternating sum Sum_{k=1..m} (-1)^k * A000005(k).

Original entry on oeis.org

1, 5, 18, 22, 25, 29, 197, 1350, 1360, 1362, 1368, 1381, 1391, 1395, 10200, 75486, 75490, 557768, 557843, 557853, 557898, 4121846, 4122064, 4122112, 4122222, 30457732, 30457773, 30457835, 30458040, 30458133, 30458138, 30458140, 30458335, 225056911, 225056919, 225056925, 225056989
Offset: 1

Views

Author

Amiram Eldar, Jan 06 2025

Keywords

Comments

Numbers m such that m | A307704(m).
The corresponding quotients, A307704(m)/m, are -1, 0, 1, 1, 1, 1, 2, 3, 3, 3, ... (see the link for more values).
a(38) > 2*10^10, if it exists.

Crossrefs

Programs

  • Mathematica
    With[{m = 10000}, Position[Accumulate[Table[(-1)^n * DivisorSigma[0, n], {n, 1, m}]]/Range[m], _?IntegerQ] // Flatten]
  • PARI
    list(lim) = my(s = 0); for(k = 1, lim, s += (-1)^k * numdiv(k); if(!(s % k), print1(k, ", ")));

A379924 Numbers m that divide the alternating sum Sum_{k=1..m} (-1)^(k+1) * usigma(k).

Original entry on oeis.org

1, 2, 9, 54, 101, 178, 189, 2071, 3070, 9171, 11450, 12794, 21405, 27553, 35285, 251974, 2069863, 2395894, 155931488, 387586437, 758519827, 1202435693, 9859113494, 42703260442
Offset: 1

Views

Author

Amiram Eldar, Jan 06 2025

Keywords

Comments

Numbers m such that m | A370898(m).
The corresponding quotients, A370898(m)/m, are -1, 1, 0, 6, 9, ... (see the link for more values).
a(25) > 5*10^10, if it exists.

Crossrefs

Cf. A034448 (usigma), A370898.

Programs

  • Mathematica
    usigma[n_] := Times @@ (1 + Power @@@ FactorInteger[n]); usigma[1] = 1; With[{m = 260000}, Position[Accumulate[Table[(-1)^n * usigma[n], {n, 1, m}]]/Range[m], _?IntegerQ] // Flatten]
  • PARI
    usigma(n) = {my(f = factor(n)); prod(i = 1, #f~, 1 + f[i, 1]^f[i, 2]); }
    list(lim) = my(s = 0); for(k = 1, lim, s += (-1)^k * usigma(k); if(!(s % k), print1(k, ", ")));
Showing 1-4 of 4 results.