A372052 Where n appears in A370952, or -1 if n never appears there.
1, 4, 49, 2, 8, 24, 47, 22, 3, 20, 5, 18, 44, 16, 175, 14, 42, 12, 173, 10, 40, 6, 171, 88, 38, 335, 169, 86, 36, 333, 167, 84, 34, 331, 7, 82, 32, 329, 9, 80, 11, 327, 13, 78, 15, 325, 17, 76, 19, 323, 21, 74, 23, 321, 25, 72, 160, 319, 7468, 70, 158, 317, 25099
Offset: 1
Keywords
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000
Programs
-
Python
from itertools import count def A372052(n): a, aset = 1, {0,1} for p in count(3,2): if a == n: return p>>1 for b in count(a%p,p): if b not in aset: aset.add(b) a = b break # Chai Wah Wu, Apr 17 2024
-
Python
# faster for initial segment of sequence def A372052_gen(): # uses A370952_gen/imports from Chai Wah Wu in A370952 adict, n = dict(), 1 for i, v in enumerate(A370952_gen(), 1): if v >= n and v not in adict: adict[v] = i while n in adict: yield adict[n]; del adict[n]; n += 1 print(list(islice(A372052_gen(), 63))) # Michael S. Branicky, Apr 18 2024
Extensions
More terms from Chai Wah Wu, Apr 17 2024