login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A377094
Inverse permutation to A377093.
2
1, 2, 4, 3, 7, 5, 12, 19, 6, 8, 27, 38, 50, 13, 9, 20, 63, 80, 98, 10, 14, 28, 117, 21, 11, 51, 140, 15, 167, 196, 226, 22, 29, 64, 16, 39, 257, 99, 52, 23, 294, 17, 335, 30, 378, 118, 423, 24, 18, 470, 65, 53, 520, 81, 31, 25, 100, 168, 573, 40, 632, 227, 693
OFFSET
1,2
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
Cf. A377093.
Sequence in context: A258237 A361939 A371237 * A108228 A127008 A199535
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Oct 16 2024
STATUS
approved