OFFSET
1,2
LINKS
Robert C. Lyons, Table of n, a(n) for n = 1..10000
PROG
(Python)
from sympy import prime, primefactors, primepi
def get_a379776(a379775_indices):
a379776 = []
count = 1
while True:
p = prime(count)
if p not in a379775_indices:
break
a379776.append(a379775_indices[p])
count += 1
return a379776
a379775 = [2]
a379775_indices = dict()
a379775_indices[2] = 1
max_a379775_len=1000
while len(a379775) <= max_a379775_len:
candidate = a379775[-1]
done = False
while not done:
candidate = 2*candidate - 1
factors = primefactors(candidate)
for factor in factors:
if factor not in a379775_indices:
a379775.append(factor)
a379775_indices[factor] = len(a379775)
done = True
break
a379776 = get_a379776(a379775_indices)
print(a379776)
CROSSREFS
KEYWORD
nonn,easy,new
AUTHOR
Robert C. Lyons, Jan 02 2025
STATUS
approved