|
|
A372052
|
|
Where n appears in A370952, or -1 if n never appears there.
|
|
3
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
PROG
|
(Python)
from itertools import count
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
(Python) # faster for initial segment of sequence
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|