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