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.

A340976 Sum_{1 < k < n} sigma(n) mod k, where sigma = A000203.

Original entry on oeis.org

0, 0, 0, 2, 2, 2, 7, 8, 18, 11, 16, 27, 30, 30, 40, 47, 46, 75, 60, 72, 101, 93, 84, 109, 146, 148, 167, 142, 137, 180, 166, 197, 254, 282, 283, 301, 247, 333, 367, 347, 283, 389, 327, 367, 475, 501, 373, 591, 517, 562, 621, 597, 491, 615, 699, 637, 810, 839, 585, 783, 671, 964, 1024
Offset: 1

Views

Author

M. F. Hasler, Feb 01 2021

Keywords

Comments

Motivated by A340180 and several other sequences that use the sum over a subset of the indices.
Is there an efficient formula for a(n)? That might answer the following questions:
1) Is a(63) = a(2^6-1) = 1024 = 2^10 just a coincidence?
2) Are there are further terms of the form 2^k, i.e., a(n) in A000079? What can be said about these n?
3) Are there other fixed points a(n) = n as for n = 7, 8?
4) What is the frequency of odd vs. even terms? a(n) is odd for consecutive indices 21..22, 35..49, 51..56, 58..61, 64..65, 68..69, 73..79, ...: Are there patterns or simple subsequence(s) of such runs of length 2 or larger?

Crossrefs

Programs

  • Mathematica
    Table[Sum[Mod[DivisorSigma[1,n],k],{k,2,n-1}],{n,1,138}] (* Metin Sariyar, Feb 02 2021 *)
  • PARI
    apply( {A340976(n,s=sigma(n))=sum(k=1,n-1,s%k)}, [1..66]) \\ M. F. Hasler, Feb 01 2021
    
  • PARI
    T(n) = n*(n+1)/2;
    S(n) = my(s=sqrtint(n)); sum(k=1, s, T(n\k) + k*(n\k)) - s*T(s); \\ A024916
    g(a,b) = my(s=0); while(a <= b, my(t=b\a); my(u=b\t); s += t*(T(u) - T(a-1)); a = u+1); s;
    a(n) = (n-1)*sigma(n) - S(sigma(n)) + g(n, sigma(n)); \\ Daniel Suteu, Feb 02 2021

Formula

a(n) = (n-1)*sigma(n) - A024916(sigma(n)) + Sum_{k=n..sigma(n)} k*floor(sigma(n)/k). - Daniel Suteu, Feb 02 2021