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.

A364559 a(n) = A005941(n) - n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 6, 0, 20, 4, -4, 0, 48, -4, 110, 0, -2, 12, 234, 0, -12, 40, -12, 8, 484, -8, 994, 0, 2, 96, -14, -8, 2012, 220, 28, 0, 4056, -4, 8150, 24, -22, 468, 16338, 0, -24, -24, 80, 80, 32716, -24, -18, 16, 202, 968, 65478, -16, 131012, 1988, -24, 0, 4, 4, 262078, 192, 446, -28, 524218, -16
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2023

Keywords

Examples

			a(528581) = -4 as A005941(528581) = 528577 = 528581-4. Notably, 528581 = 17^2 * 31 * 59, with divisors [1, 17, 31, 59, 289, 527, 1003, 1829, 8959, 17051, 31093, 528581]. Applying A364557 to these divisors gives [1, 64, 1024, 65536, 128, 1024, 65536, 65536, 2048, 131072, 65536, 131072], while applying Euler totient phi (A000010) to them gives [1, 16, 30, 58, 272, 480, 928, 1740, 8160, 15776, 27840, 473280], their differences being [0, 48, 994, 65478, -144, 544, 64608, 63796, -6112, 115296, 37696, -342208], whose sum is -4.
		

Crossrefs

Cf. A005941, A364499, A364557, A364558 (Möbius transform).
Cf. A029747 (known positions of 0's), A364560 (of terms <= 0), A364562 (of terms > 0), A364576.
Cf. also A364288.

Programs

  • PARI
    A005941(n) = { my(f=factor(n), p, p2=1, res=0); for(i=1, #f~, p = 1 << (primepi(f[i, 1])-1); res += (p * p2 * (2^(f[i, 2])-1)); p2 <<= f[i, 2]); (1+res) }; \\ (After David A. Corneth's program for A156552)
    A364559(n) = (A005941(n)-n);
    
  • Python
    from sympy import factorint, primepi
    def A364559(n): return sum(1<Chai Wah Wu, Jul 29 2023

Formula

a(n) = -A364499(A005941(n)).
a(n) = Sum_{d|n} A364558(d).