login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A340976
Sum_{1 < k < n} sigma(n) mod k, where sigma = A000203.
1
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,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