OFFSET
0,6
COMMENTS
The sign function is defined by:
- sign(0) = 0,
- sign(n) = +1 for any n > 0,
- sign(n) = -1 for any n < 0.
a(n) corresponds to the number of integers up to n in A294277 minus the number of integers up to n in A294278.
The first negative value occurs at a(178) = -1.
Will this sequence change sign indefinitely?
LINKS
Georg Fischer, Table of n, a(n) for n = 0..1000
Rémy Sigrist, Line graph of the first 10000 terms
Rémy Sigrist, Line graph of the first 100000000 terms
Rémy Sigrist, Line graph of the first 1000000000 terms
Rémy Sigrist, Line graph of the first 10000000000 terms
FORMULA
EXAMPLE
The following table shows the first terms of the sequence, alongside sign(omega(n+1)-omega(n)), omega(n+1) and omega(n):
n a(n) sign w(n+1) w(n)
- ---- ---- ------ ----
0 0
1 1 1 1 0
2 1 0 1 1
3 1 0 1 1
4 1 0 1 1
5 2 1 2 1
6 1 -1 1 2
7 1 0 1 1
8 1 0 1 1
9 2 1 2 1
10 1 -1 1 2
11 2 1 2 1
12 1 -1 1 2
13 2 1 2 1
14 2 0 2 2
15 1 -1 1 2
16 1 0 1 1
17 2 1 2 1
18 1 -1 1 2
19 2 1 2 1
20 2 0 2 2
PROG
(PARI) s = 0; for (n=1, 87, print1 (s ", "); s += sign(omega(n+1)-omega(n)))
CROSSREFS
KEYWORD
sign
AUTHOR
Rémy Sigrist, Oct 26 2017
STATUS
approved