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.

A375746 The alternating sum of sequentially decreasing moduli for every positive integer.

This page as a plain text file.
%I A375746 #17 Nov 10 2024 16:22:34
%S A375746 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,
%T A375746 0,-13,0,-1,6,-7,-23,8,7,-20,-10,9,8,-25,-14,13,-4,3,-20,-13,34,-35,
%U A375746 -34,26,-8,-13,-6,5,8,-25,-24,1,26,-27,-34
%N A375746 The alternating sum of sequentially decreasing moduli for every positive integer.
%C A375746 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.
%H A375746 James C. McMahon, <a href="/A375746/b375746.txt">Table of n, a(n) for n = 1..10000</a>
%F A375746 a(n) = Sum_{k=1..n} (-1)^(n-k) * (n mod k).
%F A375746 abs(a(n)) = A154585(n-1) for n>=2.
%e A375746 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.
%t A375746 Table[Sum[(-1)^(n-k)*Mod[n,k],{k,n}],{n,60}] (* _James C. McMahon_, Oct 18 2024 *)
%Y A375746 Cf. A154585.
%K A375746 easy,sign
%O A375746 1,7
%A A375746 _Lavender Malison_, Aug 26 2024