login
a(n) = A307720(2*n-1) - A307220(2*n).
4

%I #28 Oct 26 2021 06:52:23

%S 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,

%T 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,

%U 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

%N a(n) = A307720(2*n-1) - A307220(2*n).

%C 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.

%C See also the graphs in A307720 and A348248.

%H N. J. A. Sloane, <a href="/A348446/b348446.txt">Table of n, a(n) for n = 1..20000</a>

%H Rémy Sigrist, <a href="/A348446/a348446.png">Scatterplot of the first million terms</a>

%H Rémy Sigrist, <a href="/A348446/a348446_1.png">Scatterplot of the first five million terms</a>

%H N. J. A. Sloane, <a href="/A348446/a348446.txt">Table of n, a(n) for n = 1..500000</a>

%H Chai Wah Wu, <a href="/A348446/a348446_2.png">Scatterplot of the first 100 million terms</a>

%o (Python)

%o from itertools import islice

%o from collections import Counter

%o def A348446(): # generator of terms. Greedy algorithm

%o a = 1

%o c, b = Counter(), 1

%o while True:

%o k, kb = 1, b

%o while c[kb] >= kb:

%o k += 1

%o kb += b

%o c[kb] += 1

%o b = k

%o a2 = k

%o yield a-a2

%o k, kb = 1, b

%o while c[kb] >= kb:

%o k += 1

%o kb += b

%o c[kb] += 1

%o b = k

%o a = k

%o A348446_list = list(islice(A348446(),100)) # _Chai Wah Wu_, Oct 23 2021

%Y Cf. A066520, A307720, A307730, A348248.

%K sign

%O 1,3

%A _N. J. A. Sloane_, Oct 22 2021