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

A350743 Number of numbers k, 1 <= k <= n, such that k | sigma_k(n).

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 2, 3, 1, 5, 4, 5, 4, 5, 6, 1, 5, 4, 3, 7, 4, 5, 5, 8, 1, 7, 6, 6, 8, 9, 3, 5, 8, 7, 9, 3, 4, 10, 6, 13, 7, 8, 4, 8, 9, 7, 9, 5, 3, 5, 10, 10, 7, 13, 8, 14, 8, 12, 10, 18, 3, 10, 7, 1, 14, 10, 5, 16, 11, 12, 5, 12, 6, 9, 10, 10, 8, 14, 5, 11, 2, 13, 13, 15, 14
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 13 2022

Keywords

Examples

			a(3) = 2; we have 1 | sigma_1(3) = 1 + 3 = 4 and 2 | sigma_2(3) = 1^2 + 3^2 = 10. (Note that 3 does not divide sigma_3(3) = 1^3 + 3^3 = 28.)
		

Crossrefs

Cf. A000203 (sigma), A348399.

Programs

  • Mathematica
    Table[n - Sum[Ceiling[DivisorSigma[k, n]/k] - Floor[DivisorSigma[k, n]/k], {k, n}], {n, 100}]
  • PARI
    a(n) = sum(k=1, n, (sigma(n,k) % k) == 0); \\ Michel Marcus, Jan 13 2022
    
  • Python
    from math import prod
    from sympy import factorint
    def A350743(n):
        f = list(factorint(n).items())
        return sum(1 for k in range(1,n+1) if prod(p**((q+1)*k)-1 for p,q in f)//prod(p**k-1 for p,q in f) % k == 0) # Chai Wah Wu, Jan 17 2022

Formula

a(n) = n - Sum_{k=1..n} (ceiling(sigma_k(n)/k) - floor(sigma_k(n)/k)).
Showing 1-1 of 1 results.