OFFSET
1,4
COMMENTS
a(n) is also the distance from a node to its first prime-number descendant in a binary tree defined as: root = 1 and, for any node n, the left child = 2*n and right child = 2*n + 1. The number of primes among the nodes of depth m is equal to A036378(m) for m>=2.
FORMULA
PROG
(Python)
from sympy import isprime
for n in range(1, 101):
a = 0
k = i = 1
while isprime(i) == 0:
a += 1
k = 2*k
for i in range(k*n + 1, k*n + k):
if isprime(i) == 1: break
print(a)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ya-Ping Lu, Nov 13 2020
STATUS
approved