OFFSET
1,1
COMMENTS
Is a(n) always positive?
If a(n) > 0, then a(n) >= 2*A000720(2^(n-1)-1). - Chai Wah Wu, Jun 13 2019
FORMULA
When a(n) > 0, Sum_{k = 1..a(n)} (-1)^floor(prime(k)/2^(n-1)) = 0 (where prime(k) denotes the k-th prime number).
PROG
(PARI) { s = vector(18); a = vector(#s); u = 1; forprime (p=2, oo, n++; for (b=1, #s, if (!a[b], s[b]+=(-1)^bittest(p, b-1); if (s[b]==0, a[b]=n; while (a[u], print1 (a[u]", "); u++; if (u>#a, break(3))))))) }
(Python)
from sympy import primepi
def A308575(n):
n2, t1 = 2**(n-1), 0
k = n2 - 1
kp = primepi(k)
kp2 = primepi(k+n2)-kp
while kp2 < kp or t1 >= kp:
k += n2
t1, t2 = kp, kp2
kp2 = primepi(k+n2) - kp2
kp = t2
return 2*kp # Chai Wah Wu, Jun 13 2019
CROSSREFS
KEYWORD
nonn,base,more,hard
AUTHOR
Rémy Sigrist, Jun 08 2019
EXTENSIONS
a(20)-a(23) from Chai Wah Wu, Jun 13 2019
a(24)-a(25) from Chai Wah Wu, Jun 24 2019
STATUS
approved