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
James C. McMahon, Table of n, a(n) for n = 1..10000
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
KEYWORD
easy,sign
AUTHOR
Lavender Malison, Aug 26 2024
STATUS
approved
