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_a379900(a379899_indices):
a379900 = []
count = 1
while True:
p = prime(count)
if p not in a379899_indices:
break
a379900.append(a379899_indices[p])
count += 1
return a379900
a379899 = [2]
a379899_indices = dict()
a379899_indices[2] = 1
max_a379899_len=1000
while len(a379899) <= max_a379899_len:
candidate = a379899[-1]
done = False
while not done:
candidate = candidate + 4
factors = primefactors(candidate)
for factor in factors:
if factor not in a379899_indices:
a379899.append(factor)
a379899_indices[factor] = len(a379899)
done = True
break
a379900 = get_a379900(a379899_indices)
print(a379900)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert C. Lyons, Jan 05 2025
STATUS
approved