OFFSET
1,2
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, C++ program
EXAMPLE
A376903(42) = 88, so a(88) = 42.
PROG
(C++) // See Links section.
(Python)
from itertools import count, islice
def agen(): # generator of terms; uses A376903gen() in A376903
adict, n = dict(), 1
for k, v in enumerate(A376903gen(), 1):
if v not in adict:
adict[v] = k
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 61))) # Michael S. Branicky, Oct 16 2024
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Rémy Sigrist, Oct 09 2024
STATUS
approved