VOOZH about

URL: https://oeis.org/A375746

⇱ A375746 - OEIS


login
A375746
The alternating sum of sequentially decreasing moduli for every positive integer.
1
0, 0, -1, -1, 0, 1, -2, -4, 0, 3, -4, -5, 4, 1, -10, -4, 3, 1, -2, -9, -2, 11, -12, -17, 11, 0, -13, 0, -1, 6, -7, -23, 8, 7, -20, -10, 9, 8, -25, -14, 13, -4, 3, -20, -13, 34, -35, -34, 26, -8, -13, -6, 5, 8, -25, -24, 1, 26, -27, -34
OFFSET
1,7
COMMENTS
It is expected that this sequence will contain all integers, however in the first 25000 terms, there are only 14907 distinct integers, with -39 and 54 being the two 2 digit numbers not appearing in the first 25000 terms. This sequence, while generated in a different manner, appears to be A154585 shifted over one term and without the absolute value taken.
LINKS
FORMULA
a(n) = Sum_{k=1..n} (-1)^(n-k) * (n mod k).
abs(a(n)) = A154585(n-1) for n>=2.
EXAMPLE
For n=6, a(6) = (6 mod 6)-(6 mod 5)+(6 mod 4)-(6 mod 3)+(6 mod 2)-(6 mod 1) = 0-1+2-0+0-0 = 1.
MATHEMATICA
Table[Sum[(-1)^(n-k)*Mod[n, k], {k, n}], {n, 60}] (* James C. McMahon, Oct 18 2024 *)
CROSSREFS
Cf. A154585.
Sequence in context: A018220 A004580 A215451 * A154585 A020822 A197514
KEYWORD
easy,sign
AUTHOR
Lavender Malison, Aug 26 2024
STATUS
approved