login
A379776
a(n) = position of prime(n) in A379775, or a(n) = -1 if prime(n) is not in A379775.
3
1, 2, 3, 6, 5, 7, 4, 12, 25, 11, 20, 13, 40, 33, 43, 45, 27, 21, 44, 42, 14, 48, 71, 26, 8, 72, 64, 41, 112, 23, 116, 82, 111, 46, 62, 53, 49, 152, 80, 75, 37, 262, 122, 9, 99, 93, 38, 115, 52, 343, 28, 286, 22, 162, 104, 274, 36, 87, 47, 70, 171, 79, 18, 140
OFFSET
1,2
LINKS
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
Cf. A379775.
Sequence in context: A097723 A187831 A087786 * A210468 A080950 A023852
KEYWORD
nonn,easy
AUTHOR
Robert C. Lyons, Jan 02 2025
STATUS
approved