OFFSET
1,4
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?
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
MATHEMATICA
Table[Sum[Mod[DivisorSigma[1, n], k], {k, 2, n-1}], {n, 1, 138}] (* Metin Sariyar, Feb 02 2021 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Feb 01 2021
STATUS
approved