login
A348446
a(n) = A307720(2*n-1) - A307220(2*n).
4
0, 1, 2, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 4, 4, 4, 6, 6, 6, 5, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 4, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 1, 1, 1, 1, 1, 1, 1
OFFSET
1,3
COMMENTS
My guess is that this changes signs infinitely often, but is more likely to be positive than negative. Perhaps the behavior is akin to that of A066520, which shows the "great prime race" between primes congruent to 3 mod 4 and primes congruent to 1 mod 4.
See also the graphs in A307720 and A348248.
PROG
(Python)
from itertools import islice
from collections import Counter
def A348446(): # generator of terms. Greedy algorithm
a = 1
c, b = Counter(), 1
while True:
k, kb = 1, b
while c[kb] >= kb:
k += 1
kb += b
c[kb] += 1
b = k
a2 = k
yield a-a2
k, kb = 1, b
while c[kb] >= kb:
k += 1
kb += b
c[kb] += 1
b = k
a = k
A348446_list = list(islice(A348446(), 100)) # Chai Wah Wu, Oct 23 2021
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Oct 22 2021
STATUS
approved